You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] Run-end encoding and decoding: Add support for more types #34382
#34195 introduces two functions run_end_encode and run_end_decode supporting with support for numeric, null, and bool types. More types can and should be supported.
But simple adding add_kernel() function calls doesn't work. Tests start failing after that. Could you please explain how to add types for run_end_encode and run_end_decode properly?
About types. As I see, in theory, it's possible to add all types using add_kernel (at least, it's easy for functions with empty arguments) listed in:
To add more types we need more specializations of ReadValueImpl and WriteValueImpl similaryly to how visit_data_inline.h does. The current specialization only works on types that have a ::c_type. There needs to be one for Binary, String and another for fixed-size byte-string types like FixedSizeBinary, Decimal256.
If we can make equality of values a template parameter, RunEndEncodingLoop could also be re-used for these specializations.
Activity
dinimar commentedon Mar 17, 2023
@felipecrv
As I found out in code there're
add_kernel()function calls related to types you mentionedarrow/cpp/src/arrow/compute/kernels/vector_run_end_encode.cc
Lines 607 to 612 in f9324b7
arrow/cpp/src/arrow/compute/kernels/vector_run_end_encode.cc
Lines 631 to 636 in f9324b7
But simple adding
add_kernel()function calls doesn't work. Tests start failing after that. Could you please explain how to add types forrun_end_encodeandrun_end_decodeproperly?About types. As I see, in theory, it's possible to add all types using
add_kernel(at least, it's easy for functions with empty arguments) listed in:arrow/cpp/src/arrow/type_fwd.h
Lines 456 to 590 in f9324b7
felipecrv commentedon Mar 17, 2023
To add more types we need more specializations of
ReadValueImplandWriteValueImplsimilaryly to howvisit_data_inline.hdoes. The current specialization only works on types that have a::c_type. There needs to be one forBinary, Stringand another for fixed-size byte-string types likeFixedSizeBinary, Decimal256.If we can make equality of values a template parameter,
RunEndEncodingLoopcould also be re-used for these specializations.felipecrv commentedon Mar 28, 2023
take
GH-34382: [C++] Support more types in run_end_encode and run_end_deco…
apacheGH-34382: [C++] Support more types in run_end_encode and run_en…