pitrou commented on code in PR #50768:
URL: https://github.com/apache/arrow/pull/50768#discussion_r4071532322
##########
cpp/gdb_arrow.py:
##########
@@ -1999,6 +2015,12 @@ class FixedSizeListTypeClass(DataTypeClass):
scalar_printer = BaseListScalarPrinter
+class RunEndEncodedTypeClass(DataTypeClass):
+ is_parametric = True
+ type_printer = RunEndEncodedTypePrinter
+ scalar_printer = BaseListScalarPrinter
+
Review Comment:
Ideally we would also define a `array_data_printer` to actually print out
the array's contents but the current PR is obviously better than supporting REE
at all.
##########
cpp/gdb_arrow.py:
##########
@@ -1999,6 +2015,12 @@ class FixedSizeListTypeClass(DataTypeClass):
scalar_printer = BaseListScalarPrinter
+class RunEndEncodedTypeClass(DataTypeClass):
+ is_parametric = True
+ type_printer = RunEndEncodedTypePrinter
+ scalar_printer = BaseListScalarPrinter
Review Comment:
This might work by chance, but I don't think this is conceptually right.
Run-end-encoded is not a list type, and a run-end-encoded scalar represents a
single child value, not an entire run of values.
(as the tests show, by the way)
##########
cpp/gdb_arrow.py:
##########
@@ -2085,6 +2107,8 @@ class ExtensionTypeClass(DataTypeClass):
Type.LARGE_LIST: DataTypeTraits(BaseListTypeClass, 'LargeListType'),
Type.FIXED_SIZE_LIST: DataTypeTraits(FixedSizeListTypeClass,
'FixedSizeListType'),
+ Type.RUN_END_ENCODED: DataTypeTraits(RunEndEncodedTypeClass,
+ 'RunEndEncodedType'),
Review Comment:
Nit: since REE is not a list type, it would be better to move this below
with Dictionary and Extension.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]