Skip to content

Commit

Permalink
Support parquet thrift.convertedType.ENUM with BYTE_ARRAY as schemaEl…
Browse files Browse the repository at this point in the history
…ement.type
  • Loading branch information
yma11 committed Mar 27, 2024
1 parent 369207a commit 7de9e1b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion velox/dwio/parquet/reader/ParquetReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,19 @@ TypePtr ReaderBase::convertType(
VELOX_FAIL(
"UTF8 converted type can only be set for thrift::Type::(FIXED_LEN_)BYTE_ARRAY");
}

case thrift::ConvertedType::ENUM:
switch (schemaElement.type) {
case thrift::Type::BYTE_ARRAY:
return VARCHAR();
default:
VELOX_FAIL(
"ENUM converted type can only be set for thrift::Type::BYTE_ARRAY");
}

case thrift::ConvertedType::MAP:
case thrift::ConvertedType::MAP_KEY_VALUE:
case thrift::ConvertedType::LIST:
case thrift::ConvertedType::ENUM:
case thrift::ConvertedType::TIME_MILLIS:
case thrift::ConvertedType::TIME_MICROS:
case thrift::ConvertedType::JSON:
Expand Down

0 comments on commit 7de9e1b

Please sign in to comment.