andygrove commented on code in PR #1146:
URL: https://github.com/apache/datafusion-comet/pull/1146#discussion_r1873533892


##########
native/spark-expr/src/cast.rs:
##########
@@ -547,30 +540,41 @@ impl Cast {
     pub fn new(
         child: Arc<dyn PhysicalExpr>,
         data_type: DataType,
-        eval_mode: EvalMode,
-        timezone: String,
-        allow_incompat: bool,
+        cast_options: SparkCastOptions,
     ) -> Self {
         Self {
             child,
             data_type,
-            timezone,
+            cast_options,
+        }
+    }
+}
+
+/// Spark cast options
+#[derive(Debug, Clone, Hash, PartialEq, Eq)]
+pub struct SparkCastOptions {
+    /// Spark evaluation mode
+    pub eval_mode: EvalMode,
+    /// When cast from/to timezone related types, we need timezone, which will 
be resolved with
+    /// session local timezone by an analyzer in Spark.
+    pub timezone: String,

Review Comment:
   I filed https://github.com/apache/datafusion-comet/issues/1147 for changing 
timezone from `String` to `Option<Tz>` in the future. We were already passing 
this around as string prior to this PR.



-- 
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: github-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to