本文整理了Java中com.facebook.presto.spi.block.Block.getSlice()
方法的一些代码示例,展示了Block.getSlice()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.getSlice()
方法的具体详情如下:
包路径:com.facebook.presto.spi.block.Block
类名称:Block
方法名:getSlice
[英]Gets a slice at offset in the value at position.
[中]获取位置处的值中偏移处的切片。
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, block.getSliceLength(position));
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(int position, int offset, int length)
{
assureLoaded();
return block.getSlice(position, offset, length);
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, block.getSliceLength(position));
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(int position, int offset, int length)
{
return dictionary.getSlice(getId(position), offset, length);
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, block.getSliceLength(position));
}
代码示例来源:origin: prestodb/presto
@Override
public final Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, getFixedSize());
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, block.getSliceLength(position));
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(int position, int offset, int length)
{
checkReadablePosition(position);
return value.getSlice(0, offset, length);
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, block.getSliceLength(position));
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(int position, int offset, int length)
{
position = getAbsolutePosition(position);
if (position % 2 == 0) {
return getRawKeyBlock().getSlice(position / 2, offset, length);
}
else {
return getRawValueBlock().getSlice(position / 2, offset, length);
}
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(Block block, int position)
{
return block.getSlice(position, 0, block.getSliceLength(position));
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(int position, int offset, int length)
{
checkFieldIndex(position);
return getRawFieldBlock(position).getSlice(rowIndex, offset, length);
}
代码示例来源:origin: prestodb/presto
@Override
public int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
{
Slice leftSlice = leftBlock.getSlice(leftPosition, 0, leftBlock.getSliceLength(leftPosition));
Slice rightSlice = rightBlock.getSlice(rightPosition, 0, rightBlock.getSliceLength(rightPosition));
return compareChars(leftSlice, rightSlice);
}
代码示例来源:origin: prestodb/presto
@Override
public Slice getSlice(int position, int offset, int length)
{
checkReadablePosition(position);
return getBlock().getSlice(position + start, offset, length);
}
代码示例来源:origin: prestodb/presto
@Override
public Object getObjectValue(ConnectorSession session, Block block, int position)
{
if (block.isNull(position)) {
return null;
}
return block.getSlice(position, 0, block.getSliceLength(position)).toStringUtf8();
}
代码示例来源:origin: prestodb/presto
@Override
public Object getObjectValue(ConnectorSession session, Block block, int position)
{
if (block.isNull(position)) {
return null;
}
// TODO: There's no way to represent string value of a custom type
return new SqlVarbinary(block.getSlice(position, 0, block.getSliceLength(position)).getBytes());
}
代码示例来源:origin: prestodb/presto
@Override
public Object getObjectValue(ConnectorSession session, Block block, int position)
{
if (block.isNull(position)) {
return null;
}
Slice slice = block.getSlice(position, 0, block.getSliceLength(position));
return deserialize(slice).asText();
}
}
代码示例来源:origin: prestodb/presto
@Override
public Object getObjectValue(ConnectorSession session, Block block, int position)
{
if (block.isNull(position)) {
return null;
}
Slice slice = block.getSlice(position, 0, block.getSliceLength(position));
return deserialize(slice).asText();
}
}
代码示例来源:origin: prestodb/presto
@Override
public Object getObjectValue(ConnectorSession session, Block block, int position)
{
if (block.isNull(position)) {
return null;
}
return new SqlVarbinary(block.getSlice(position, 0, block.getSliceLength(position)).getBytes());
}
代码示例来源:origin: prestodb/presto
@Override
public Object getObjectValue(ConnectorSession session, Block block, int position)
{
if (block.isNull(position)) {
return null;
}
return new SqlVarbinary(block.getSlice(position, 0, block.getSliceLength(position)).getBytes());
}
}
内容来源于网络,如有侵权,请联系作者删除!