public static Slice getSlice(Type type, RowResult row, int field) { if (type instanceof VarcharType) { return Slices.utf8Slice(row.getString(field)); } else if (type instanceof VarbinaryType) { return Slices.wrappedBuffer(row.getBinary(field)); } else if (type instanceof DecimalType) { BigDecimal dec = row.getDecimal(field); return Decimals.encodeScaledValue(dec); } else { throw new IllegalStateException("getSlice not implemented for " + type); } } }
return Slices.wrappedBuffer(row.getBinary(field));
break; case BINARY: to.addBinary(i, from.getBinary(i)); break; default:
ByteBuffer value = result.getBinary(pci.index); if (pci.kuduColumn.isNullable()) { ((NullableVarBinaryVector.Mutator) pci.vv.getMutator())
return result.getBinary(jpaColumnName); case BOOL: return result.getBoolean(jpaColumnName);
/** * Get the specified column's binary data. * * This doesn't copy the data and instead returns a ByteBuffer that wraps it. * * @param columnName name of the column to get data for * @return a ByteBuffer with the binary data. * @throws IllegalArgumentException if the column doesn't exist, is null, * or if the type doesn't match the column's type * @throws IndexOutOfBoundsException if the column doesn't exist */ public ByteBuffer getBinary(String columnName) { return getBinary(this.schema.getColumnIndex(columnName)); }
public static Slice getSlice(Type type, RowResult row, int field) { if (type instanceof VarcharType) { return Slices.utf8Slice(row.getString(field)); } else if (type instanceof VarbinaryType) { return Slices.wrappedBuffer(row.getBinary(field)); } else if (type instanceof DecimalType) { BigDecimal dec = row.getDecimal(field); return Decimals.encodeScaledValue(dec); } else { throw new IllegalStateException("getSlice not implemented for " + type); } } }
public static Slice getSlice(Type type, RowResult row, int field) { if (type instanceof VarcharType) { return Slices.utf8Slice(row.getString(field)); } else if (type instanceof VarbinaryType) { return Slices.wrappedBuffer(row.getBinary(field)); } else if (type instanceof DecimalType) { BigDecimal dec = row.getDecimal(field); return Decimals.encodeScaledValue(dec); } else { throw new IllegalStateException("getSlice not implemented for " + type); } } }
case Common.DataType.BINARY_VALUE: ((PojoUtils.Setter<T,ByteBuffer>)settersForThisQueryScan.get(aColumnName)).set( payload,aRow.getBinary(aColumnName)); break; case Common.DataType.STRING_VALUE:
return row.getBoolean(field); } else if (type instanceof VarbinaryType) { return Slices.wrappedBuffer(row.getBinary(field)); } else if (type instanceof DecimalType) { return row.getDecimal(field);
return Slices.wrappedBuffer(row.getBinary(field));
switch (type) { case BINARY: values.setField(i, name, row.getBinary(i)); break; case STRING:
break; case BINARY: to.addBinary(i, from.getBinary(i)); break; default:
break; case BINARY: to.addBinary(i, from.getBinary(i)); break; default: