zagto commented on code in PR #13330:
URL: https://github.com/apache/arrow/pull/13330#discussion_r952033171
##########
cpp/src/arrow/visitor_generate.h:
##########
@@ -35,34 +35,39 @@ namespace arrow {
ACTION(Float); \
ACTION(Double)
-#define ARROW_GENERATE_FOR_ALL_TYPES(ACTION) \
- ACTION(Null); \
- ACTION(Boolean); \
- ARROW_GENERATE_FOR_ALL_NUMERIC_TYPES(ACTION); \
- ACTION(String); \
- ACTION(Binary); \
- ACTION(LargeString); \
- ACTION(LargeBinary); \
- ACTION(FixedSizeBinary); \
- ACTION(Duration); \
- ACTION(Date32); \
- ACTION(Date64); \
- ACTION(Timestamp); \
- ACTION(Time32); \
- ACTION(Time64); \
- ACTION(MonthDayNanoInterval); \
- ACTION(MonthInterval); \
- ACTION(DayTimeInterval); \
- ACTION(Decimal128); \
- ACTION(Decimal256); \
- ACTION(List); \
- ACTION(LargeList); \
- ACTION(Map); \
- ACTION(FixedSizeList); \
- ACTION(Struct); \
- ACTION(SparseUnion); \
- ACTION(DenseUnion); \
- ACTION(Dictionary); \
+// all types that can exist as a Scalar
+#define ARROW_GENERATE_FOR_ALL_SCALAR_TYPES(ACTION) \
Review Comment:
I think all types that exist in arrow right now can exist as scalars. I was
considering adding an RLE scalar class for consistency. But the encoding can
only be applied to arrays, so an RLE scalar would just be a wrapper for another
scalar of the actual data type. To me that seems like something you would not
actually want to use and therefore it should not exist.
The idea for new macro is code that works on scalar values does not need to
generate a case for RLE (and possibly other future array encodings), which
would be unnecessary and may also result in using
`type_traits<RunLengthEncoded>::ScalarType`
--
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]