sfc-gh-nchao commented on code in PR #45375:
URL: https://github.com/apache/arrow/pull/45375#discussion_r1962491542
##########
cpp/src/parquet/types.cc:
##########
@@ -1619,6 +1629,22 @@ class LogicalType::Impl::Float16 final : public
LogicalType::Impl::Incompatible,
GENERATE_MAKE(Float16)
+class LogicalType::Impl::Variant final : public
LogicalType::Impl::Incompatible,
+ public
LogicalType::Impl::SimpleApplicable {
+ public:
+ friend class VariantLogicalType;
+
+ OVERRIDE_TOSTRING(Variant)
+ OVERRIDE_TOTHRIFT(VariantType, VARIANT)
+
+ private:
+ Variant()
+ : LogicalType::Impl(LogicalType::Type::VARIANT, SortOrder::UNKNOWN),
+ LogicalType::Impl::SimpleApplicable(parquet::Type::BYTE_ARRAY) {}
Review Comment:
@wgtmac - I updated the thrift definition of variant to include required
metadata and value binary members, and I passed the metadata and value into
VariantLogicalType / LogicalType::Impl::Variant to populate the required helper
methods.
Afterwards, I saw that Maps and Lists take a different approach - they
appear to have barebones MapLogicalType and ListLogicalTypes respectively, and
I don't see their structure defined clearly in parquet.thrift. It looks like
their structure is listed in
[LogicalTypes.md](https://github.com/apache/parquet-format/blob/master/LogicalTypes.md)
and referencing again in some
[tests](https://github.com/apache/arrow/blob/main/cpp/src/parquet/arrow/arrow_schema_test.cc#L1275-L1281).
What's the difference between defining the members in the parquet.thrift
strict versus using GroupNodes built on top of PrimitiveNodes?
--
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]