本文整理了Java中com.facebook.presto.spi.block.Block.writeBytesTo()
方法的一些代码示例,展示了Block.writeBytesTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.writeBytesTo()
方法的具体详情如下:
包路径:com.facebook.presto.spi.block.Block
类名称:Block
方法名:writeBytesTo
[英]Appends the byte sequences at offset in the value at positionto blockBuilder. This method must be implemented if @{code getSlice} is implemented.
[中]将位置处的值中偏移处的字节序列追加到blockBuilder。如果实现了@{code getSlice},则必须实现此方法。
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
block.writeBytesTo(position, offset, length, blockBuilder);
}
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
dictionary.writeBytesTo(getId(position), offset, length, blockBuilder);
}
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
checkReadablePosition(position);
value.writeBytesTo(0, offset, length, blockBuilder);
}
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
assureLoaded();
block.writeBytesTo(position, offset, length, blockBuilder);
}
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
position = getAbsolutePosition(position);
if (position % 2 == 0) {
getRawKeyBlock().writeBytesTo(position / 2, offset, length, blockBuilder);
}
else {
getRawValueBlock().writeBytesTo(position / 2, offset, length, blockBuilder);
}
}
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
checkFieldIndex(position);
getRawFieldBlock(position).writeBytesTo(rowIndex, offset, length, blockBuilder);
}
代码示例来源:origin: prestodb/presto
@Override
public void writeBytesTo(int position, int offset, int length, BlockBuilder blockBuilder)
{
checkReadablePosition(position);
getBlock().writeBytesTo(position + start, offset, length, blockBuilder);
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, getFixedSize(), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, getFixedSize(), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
@Override
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
{
if (block.isNull(position)) {
blockBuilder.appendNull();
}
else {
block.writeBytesTo(position, 0, block.getSliceLength(position), blockBuilder);
blockBuilder.closeEntry();
}
}
代码示例来源:origin: prestodb/presto
private int addNewElement(long hashPosition, Block block, int position)
{
checkArgument(!block.isNull(position), "position is null");
block.writeBytesTo(position, 0, block.getSliceLength(position), elementBlock);
elementBlock.closeEntry();
int newElementPositionInBlock = elementBlock.getPositionCount() - 1;
blockPositionByHash.set(hashPosition, newElementPositionInBlock);
// increase capacity, if necessary
if (elementBlock.getPositionCount() >= maxFill) {
rehash(maxFill * 2);
}
return newElementPositionInBlock;
}
内容来源于网络,如有侵权,请联系作者删除!