public abstract class BaseBinaryEncoderBuilder extends CodecBuilder
| Modifier and Type | Field and Description |
|---|---|
protected Map<TypeRef<?>,Expression.Reference> |
arrayWriterMap |
protected static TypeRef<BinaryArrayWriter> |
arrayWriterTypeToken |
protected static TypeRef<org.apache.arrow.vector.types.pojo.Field> |
ARROW_FIELD_TYPE |
protected Map<TypeRef<?>,Expression.Reference> |
beanEncoderMap |
protected static TypeRef<BinaryArray> |
binaryArrayTypeToken |
protected static TypeRef<BinaryRow> |
binaryRowTypeToken |
protected static String |
REFERENCES_NAME |
protected static TypeRef<Row> |
rowTypeToken |
protected Map<TypeRef<?>,Expression.Reference> |
rowWriterMap |
protected static TypeRef<BinaryRowWriter> |
rowWriterTypeToken |
protected static TypeRef<org.apache.arrow.vector.types.pojo.Schema> |
SCHEMA_TYPE |
protected static TypeRef<org.apache.arrow.vector.types.pojo.Schema> |
schemaTypeToken |
protected static TypeRef<BinaryWriter> |
writerTypeToken |
beanClass, beanType, ctx, fieldMap, FURY_NAME, furyRef, isRecord, recordComponentDefaultValues, recordCtrAccessible, ROOT_OBJECT_NAME| Constructor and Description |
|---|
BaseBinaryEncoderBuilder(CodegenContext context,
Class<?> beanClass) |
BaseBinaryEncoderBuilder(CodegenContext context,
TypeRef<?> beanType) |
| Modifier and Type | Method and Description |
|---|---|
String |
codecClassName(Class<?> beanClass) |
String |
codecClassName(Class<?> beanClass,
String prefix) |
String |
codecQualifiedClassName(Class<?> beanClass) |
String |
codecQualifiedClassName(Class<?> beanClass,
String prefix) |
protected String |
codecSuffix() |
protected Expression |
deserializeFor(Expression value,
TypeRef<?> typeRef)
Returns an expression that deserialize
value as a java object of type
typeToken. |
protected Expression |
deserializeForArray(Expression arrayData,
TypeRef<?> typeRef)
Return an expression that deserialize
arrayData. |
protected Expression |
deserializeForBean(Expression row,
TypeRef<?> typeRef)
Returns an expression that deserialize
row as a java bean of type typeToken
. |
protected Expression |
deserializeForCollection(Expression arrayData,
TypeRef<?> typeRef)
Returns an expression that deserialize
arrayData as a java collection. |
protected Expression |
deserializeForMap(Expression mapData,
TypeRef<?> typeRef)
Returns an expression that deserialize
mapData as a java map. |
protected Expression |
deserializeForMultiDimensionArray(Expression arrayData,
Expression rootJavaArray,
int numDimensions,
TypeRef<?> typeRef,
Expression[] indexes)
Returns an expression to deserialize multi-array from
arrayData, and set value to
rootJavaArray. |
protected Expression |
deserializeForObject(Expression value,
TypeRef<?> typeRef)
Using fury to deserialize sliced MemoryBuffer.
|
protected Expression.Reference |
getOrCreateArrayWriter(TypeRef<?> typeRef,
Expression arrayDataType,
Expression writer)
Get or create an ArrayWriter for given
type and use writer as parent
writer. |
protected Expression.Reference |
getOrCreateArrayWriter(TypeRef<?> typeRef,
Expression arrayDataType,
Expression writer,
boolean reuse) |
protected Expression |
newCollection(TypeRef<?> typeRef)
Create a java collection.
|
protected Expression |
newMap(TypeRef<?> typeRef)
Create a java map.
|
protected Expression |
serializeFor(Expression ordinal,
Expression inputObject,
Expression writer,
TypeRef<?> typeRef,
Expression arrowField)
Return an expression for serializing an object of given type to row format representation.
|
protected Expression |
serializeForArray(Expression inputObject,
Expression writer,
TypeRef<?> typeRef,
Expression arrowField)
Returns an expression to write iterable
inputObject of type typeToken
as BinaryArray using given writer. |
protected Expression |
serializeForArray(Expression inputObject,
Expression writer,
TypeRef<?> typeRef,
Expression arrowField,
boolean reuse) |
protected Expression |
serializeForBean(Expression ordinal,
Expression writer,
Expression inputObject,
TypeRef<?> typeRef,
Expression structField)
Returns an expression to write bean
inputObject to position ordinal
of row/array using given writer. |
protected Expression |
serializeForMap(Expression ordinal,
Expression writer,
Expression inputObject,
TypeRef<?> typeRef,
Expression arrowField)
Returns an expression to write map
inputObject to position ordinal of
row/array using given writer. |
protected Expression |
serializeForObject(Expression ordinal,
Expression writer,
Expression inputObject)
Return an expression to serialize opaque
inputObject as binary using fury
. |
protected Expression |
setValueOrNull(Expression writer,
Expression ordinal,
Expression inputObject,
Expression value) |
beanClassExpr, beanClassExpr, buildDecodeExpression, buildDefaultComponentsArray, buildEncodeExpression, buildRecordComponentDefaultValues, genCode, getFieldValue, getRecordCtrHandle, newBean, readChar, readFloat32, readFloat64, readInt16, readInt32, readInt64, readIntFunc, readLongFunc, readVarInt32, setFieldValue, sourcePublicAccessible, staticBeanClassExpr, staticClassFieldExpr, tryCastIfPublic, tryCastIfPublic, tryCastIfPublic, tryInlineCast, unsafeGet, unsafeGetBoolean, unsafeGetChar, unsafeGetDouble, unsafeGetFloat, unsafeGetInt, unsafeGetLong, unsafeGetShort, unsafePut, unsafePutBoolean, unsafePutChar, unsafePutDouble, unsafePutFloat, unsafePutInt, unsafePutLong, unsafePutShortprotected static final String REFERENCES_NAME
protected static final TypeRef<org.apache.arrow.vector.types.pojo.Schema> SCHEMA_TYPE
protected static final TypeRef<org.apache.arrow.vector.types.pojo.Field> ARROW_FIELD_TYPE
protected static TypeRef<org.apache.arrow.vector.types.pojo.Schema> schemaTypeToken
protected static TypeRef<BinaryWriter> writerTypeToken
protected static TypeRef<BinaryRowWriter> rowWriterTypeToken
protected static TypeRef<BinaryArrayWriter> arrayWriterTypeToken
protected static TypeRef<BinaryArray> binaryArrayTypeToken
protected final Map<TypeRef<?>,Expression.Reference> arrayWriterMap
protected final Map<TypeRef<?>,Expression.Reference> beanEncoderMap
protected final Map<TypeRef<?>,Expression.Reference> rowWriterMap
public BaseBinaryEncoderBuilder(CodegenContext context, Class<?> beanClass)
public BaseBinaryEncoderBuilder(CodegenContext context, TypeRef<?> beanType)
protected String codecSuffix()
protected Expression serializeFor(Expression ordinal, Expression inputObject, Expression writer, TypeRef<?> typeRef, Expression arrowField)
ordinal of row/array using given
writerprotected Expression serializeForArray(Expression inputObject, Expression writer, TypeRef<?> typeRef, Expression arrowField)
inputObject of type typeToken
as BinaryArray using given writer.protected Expression serializeForArray(Expression inputObject, Expression writer, TypeRef<?> typeRef, Expression arrowField, boolean reuse)
protected Expression.Reference getOrCreateArrayWriter(TypeRef<?> typeRef, Expression arrayDataType, Expression writer)
type and use writer as parent
writer.protected Expression.Reference getOrCreateArrayWriter(TypeRef<?> typeRef, Expression arrayDataType, Expression writer, boolean reuse)
protected Expression serializeForMap(Expression ordinal, Expression writer, Expression inputObject, TypeRef<?> typeRef, Expression arrowField)
inputObject to position ordinal of
row/array using given writer.protected Expression serializeForBean(Expression ordinal, Expression writer, Expression inputObject, TypeRef<?> typeRef, Expression structField)
inputObject to position ordinal
of row/array using given writer.protected Expression serializeForObject(Expression ordinal, Expression writer, Expression inputObject)
inputObject as binary using fury
. When deserialization, using fury to deserialize sliced MemoryBuffer. See BinaryUtils.getElemAccessMethodName(TypeRef), Getters.getBuffer(int)protected Expression setValueOrNull(Expression writer, Expression ordinal, Expression inputObject, Expression value)
protected Expression deserializeFor(Expression value, TypeRef<?> typeRef)
value as a java object of type
typeToken.protected Expression deserializeForBean(Expression row, TypeRef<?> typeRef)
row as a java bean of type typeToken
.protected Expression deserializeForMap(Expression mapData, TypeRef<?> typeRef)
mapData as a java map.protected Expression deserializeForCollection(Expression arrayData, TypeRef<?> typeRef)
arrayData as a java collection.protected Expression newCollection(TypeRef<?> typeRef)
protected Expression newMap(TypeRef<?> typeRef)
HashMap if typeToken is super class of
HashMap; Create an instance of typeToken otherwise.protected Expression deserializeForMultiDimensionArray(Expression arrayData, Expression rootJavaArray, int numDimensions, TypeRef<?> typeRef, Expression[] indexes)
arrayData, and set value to
rootJavaArray.protected Expression deserializeForArray(Expression arrayData, TypeRef<?> typeRef)
arrayData. If array is multi-array, forward
to deserializeForMultiDimensionArray(org.apache.fury.codegen.Expression, org.apache.fury.codegen.Expression, int, org.apache.fury.reflect.TypeRef<?>, org.apache.fury.codegen.Expression[])protected Expression deserializeForObject(Expression value, TypeRef<?> typeRef)
BinaryUtils.getElemAccessMethodName(TypeRef), Getters.getBuffer(int)Copyright © 2023-2024, The Apache Software Foundation. Apache Fury™, Fury™, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.