comphead commented on code in PR #2729:
URL: https://github.com/apache/datafusion-comet/pull/2729#discussion_r2611505585
##########
spark/src/main/scala/org/apache/comet/serde/operator/CometIcebergNativeScan.scala:
##########
@@ -64,6 +68,84 @@ object CometIcebergNativeScan extends
CometOperatorSerde[CometBatchScanExec] wit
}
}
+ /**
+ * Converts an Iceberg partition value to JSON format expected by
iceberg-rust.
+ *
+ * iceberg-rust's Literal::try_from_json() expects specific formats for
certain types:
+ * - Timestamps: ISO string format "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
+ * - Dates: ISO string format "YYYY-MM-DD"
+ * - Decimals: String representation
+ *
+ * See: iceberg-rust/crates/iceberg/src/spec/values/literal.rs
+ */
+ private def partitionValueToJson(fieldTypeStr: String, value: Any): JValue =
{
+ fieldTypeStr match {
+ case t if t.startsWith("timestamp") =>
Review Comment:
any chance type name can be case sensitive?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]