You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zhjwpku (via GitHub)" <gi...@apache.org> on 2025/08/03 10:51:24 UTC

Re: [PR] feat: implement Literal Transform [iceberg-cpp]

zhjwpku commented on code in PR #156:
URL: https://github.com/apache/iceberg-cpp/pull/156#discussion_r2249923817


##########
src/iceberg/transform.h:
##########
@@ -172,6 +174,8 @@ class ICEBERG_EXPORT TransformFunction {
   TransformFunction(TransformType transform_type, std::shared_ptr<Type> source_type);
   /// \brief Transform an input array to a new array
   virtual Result<ArrowArray> Transform(const ArrowArray& data) = 0;

Review Comment:
   I'm not sure this is a good API, since it requires constructing ArrowSchema on the fly. I think multi-args transforms could be handled in other ways, I'll leave it as is for now.



##########
src/iceberg/expression/literal.h:
##########
@@ -63,7 +63,10 @@ class ICEBERG_EXPORT Literal {
   /// \brief Factory methods for primitive types
   static Literal Boolean(bool value);
   static Literal Int(int32_t value);
+  static Literal Date(int32_t value);
   static Literal Long(int64_t value);
+  static Literal Timestamp(int64_t value);

Review Comment:
   done



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org