feat: implement transform ResultType#132
Conversation
We have seen quite a lot timeout from downloading thrift-0.20.0. Should we fix this in the Arrow repo to use more stable URL? @lidavidm @raulcd |
|
cc @gty404 |
src/iceberg/transform_function.cc
Outdated
| case TypeId::kUuid: | ||
| case TypeId::kFixed: | ||
| case TypeId::kBinary: | ||
| return std::make_shared<IntType>(); |
There was a problem hiding this comment.
Do you need to define a static variable to avoid creating a new object every time, or add a singleton to the corresponding type? The following return values are also similar.
There was a problem hiding this comment.
+1 Sorry - I had also meant to but as you can see recently I don't have the time.
There was a problem hiding this comment.
Changed to the singleton way, please take a look. @gty404
3511cdf to
d56f432
Compare
gty404
left a comment
There was a problem hiding this comment.
The type objects in test can also be modified to singleton.
d56f432 to
bb47fb5
Compare
Yeah, that's an oversight, fixed. |
bb47fb5 to
41c92a6
Compare
src/iceberg/transform_function.cc
Outdated
| Result<std::shared_ptr<Type>> BucketTransform::ResultType() const { | ||
| return NotImplemented("BucketTransform::result_type"); | ||
| auto src_type = source_type(); | ||
| switch (src_type->type_id()) { |
There was a problem hiding this comment.
Shouldn't we check this in the Make function and blindly return int32() here? We can add static bool BucketTransform::Accepts(const std::shared_ptr<Type>& source_type). I'm open to discuss this but not a blocker for this PR.
There was a problem hiding this comment.
True, changed to suggested, I didn't not add Accepts though.
No description provided.