-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Simplify serialization by removing redundant PrimitiveScalarValue
#3612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9268a85
d8fa6b1
ebcc6a0
d754b94
9778a47
595c970
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -761,9 +761,13 @@ message StructValue { | |
| } | ||
|
|
||
| message ScalarValue{ | ||
| oneof value { | ||
| // Null value of any type (type is encoded) | ||
| PrimitiveScalarType null_value = 19; | ||
| // was PrimitiveScalarType null_value = 19; | ||
| reserved 19; | ||
|
|
||
| oneof value { | ||
| // was PrimitiveScalarType null_value = 19; | ||
| // Null value of any type | ||
| ArrowType null_value = 33; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be a dumb question but why are nulls typed? This encoding of scalarvalue seems to conflate encoding the schema with encoding the values, which seems unfortunate. Perhaps we could take a look at what substrait does and copy that?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean why are nulls typed in general? Basically because of how I can't remember what the problem was but it didn't work easily. In my opinion at least the serialization should follow how they are implemented in |
||
|
|
||
| bool bool_value = 1; | ||
| string utf8_value = 2; | ||
|
|
@@ -778,7 +782,7 @@ message ScalarValue{ | |
| uint64 uint64_value = 11; | ||
| float float32_value = 12; | ||
| double float64_value = 13; | ||
| //Literal Date32 value always has a unit of day | ||
| // Literal Date32 value always has a unit of day | ||
| int32 date_32_value = 14; | ||
| ScalarListValue list_value = 17; | ||
| //WAS: ScalarType null_list_value = 18; | ||
|
|
@@ -803,48 +807,9 @@ message Decimal128{ | |
| int64 s = 3; | ||
| } | ||
|
|
||
| // Contains all valid datafusion scalar type except for | ||
| // List | ||
| enum PrimitiveScalarType{ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these types are already handled in |
||
|
|
||
| BOOL = 0; // arrow::Type::BOOL | ||
| UINT8 = 1; // arrow::Type::UINT8 | ||
| INT8 = 2; // arrow::Type::INT8 | ||
| UINT16 = 3; // represents arrow::Type fields in src/arrow/type.h | ||
| INT16 = 4; | ||
| UINT32 = 5; | ||
| INT32 = 6; | ||
| UINT64 = 7; | ||
| INT64 = 8; | ||
| FLOAT32 = 9; | ||
| FLOAT64 = 10; | ||
| UTF8 = 11; | ||
| LARGE_UTF8 = 12; | ||
| DATE32 = 13; | ||
| TIMESTAMP_MICROSECOND = 14; | ||
| TIMESTAMP_NANOSECOND = 15; | ||
| NULL = 16; | ||
| DECIMAL128 = 17; | ||
| DATE64 = 20; | ||
| TIMESTAMP_SECOND = 21; | ||
| TIMESTAMP_MILLISECOND = 22; | ||
| INTERVAL_YEARMONTH = 23; | ||
| INTERVAL_DAYTIME = 24; | ||
| INTERVAL_MONTHDAYNANO = 28; | ||
|
|
||
| BINARY = 25; | ||
| LARGE_BINARY = 26; | ||
|
|
||
| TIME64 = 27; | ||
| } | ||
|
|
||
|
|
||
| // Broke out into multiple message types so that type | ||
| // metadata did not need to be in separate message | ||
| // All types that are of the empty message types contain no additional metadata | ||
| // about the type | ||
| // Serialized data type | ||
| message ArrowType{ | ||
| oneof arrow_type_enum{ | ||
| oneof arrow_type_enum { | ||
| EmptyMessage NONE = 1; // arrow::Type::NA | ||
| EmptyMessage BOOL = 2; // arrow::Type::BOOL | ||
| EmptyMessage UINT8 = 3; // arrow::Type::UINT8 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.