Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,30 @@ private static void add(Class<?> c, FullTypeDescriptor f) {
// Both of these binary types are valid
add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.BINARY, null));
add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY, null));
add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.INT96, null));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, for something like this, does it make more sense to use a different java class other than Binary? we could use String for UTF8, and BigNum or something here?

Maybe that could be a higher level API on top of this one though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this here is just to make filter checking pass if user needs INT96 for a filter.
It seems INT96 is designed as Binary in PrimitiveType. Maybe higher level API could bind it with other java class. Not sure which to use here other than Binary?


add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.BINARY, OriginalType.UTF8));
add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY, OriginalType.UTF8));

add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.BINARY, OriginalType.DECIMAL));
add(Binary.class, new FullTypeDescriptor(PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY, OriginalType.DECIMAL));

// Both of these int types are valid
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.DATE));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.TIME_MILLIS));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.DECIMAL));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.UINT_8));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.UINT_16));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.UINT_32));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.INT_8));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.INT_16));
add(Integer.class, new FullTypeDescriptor(PrimitiveTypeName.INT32, OriginalType.INT_32));

// Both of these long types are valid
add(Long.class, new FullTypeDescriptor(PrimitiveTypeName.INT64, OriginalType.TIMESTAMP_MILLIS));
add(Long.class, new FullTypeDescriptor(PrimitiveTypeName.INT64, OriginalType.DECIMAL));
add(Long.class, new FullTypeDescriptor(PrimitiveTypeName.INT64, OriginalType.UINT_64));
add(Long.class, new FullTypeDescriptor(PrimitiveTypeName.INT64, OriginalType.INT_64));
}

/**
Expand Down