westonpace commented on code in PR #40696:
URL: https://github.com/apache/arrow/pull/40696#discussion_r1534447010
##########
cpp/src/arrow/engine/substrait/extension_set.cc:
##########
@@ -1043,6 +1049,10 @@ struct DefaultExtensionIdRegistry :
ExtensionIdRegistryImpl {
TypeName{uint32(), "u32"},
TypeName{uint64(), "u64"},
TypeName{float16(), "fp16"},
+ TypeName{large_utf8(), "large_string"},
+ TypeName{large_binary(), "large_binary"},
+ TypeName{date64(), "date_millis"},
+ TypeName{time64(TimeUnit::NANO), "time_nanos"},
Review Comment:
During encoding we need to figure out the type's "name". We do this by
looking into the registry. The registry, for types, holds:
```
std::unordered_map<const DataType*, int, TypePtrHashEq, TypePtrHashEq>
type_to_index_;
```
As a result, we can only register a single UDT name per `DataType`. We can
get away with it in `time64` because `time64(TimeUnit::MICROS)` doesn't go down
the UDT path and doesn't use the above map.
With `time32` we could only support one of `TimeUnit::SECOND` or
`TimeUnit::MILLISECONDS`. I suppose I could have just picked one but I went
with the "let's just solve this when we tackle parameterized UDTs" route.
--
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]