pitrou commented on a change in pull request #8160:
URL: https://github.com/apache/arrow/pull/8160#discussion_r488689985
##########
File path: cpp/src/arrow/csv/converter.cc
##########
@@ -601,18 +631,30 @@ Result<std::shared_ptr<DictionaryConverter>>
DictionaryConverter::Make(
DictionaryConverter* ptr;
switch (type->id()) {
-#define CONVERTER_CASE(TYPE_ID, CONVERTER_TYPE) \
- case TYPE_ID: \
- ptr = new CONVERTER_TYPE(type, options, pool); \
+#define CONVERTER_CASE(TYPE_ID, TYPE, VALUE_DECODER_TYPE)
\
+ case TYPE_ID:
\
+ ptr = new TypedDictionaryConverter<TYPE, VALUE_DECODER_TYPE>(type,
options, pool); \
break;
- CONVERTER_CASE(Type::BINARY, (DictionaryBinaryConverter<BinaryType,
false>))
+ // XXX Are 32-bit types useful?
+ CONVERTER_CASE(Type::INT32, Int32Type, NumericValueDecoder<Int32Type>)
+ CONVERTER_CASE(Type::INT64, Int64Type, NumericValueDecoder<Int64Type>)
+ CONVERTER_CASE(Type::UINT32, UInt32Type, NumericValueDecoder<UInt32Type>)
+ CONVERTER_CASE(Type::UINT64, UInt64Type, NumericValueDecoder<UInt64Type>)
+ CONVERTER_CASE(Type::FLOAT, FloatType, NumericValueDecoder<FloatType>)
+ CONVERTER_CASE(Type::DOUBLE, DoubleType, NumericValueDecoder<DoubleType>)
+ CONVERTER_CASE(Type::DECIMAL, Decimal128Type, DecimalValueDecoder)
+ CONVERTER_CASE(Type::FIXED_SIZE_BINARY, FixedSizeBinaryType,
+ FixedSizeBinaryValueDecoder)
+ CONVERTER_CASE(Type::BINARY, BinaryType, BinaryValueDecoder<false>)
Review comment:
It's already there, a bit below.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]