alamb commented on code in PR #3110:
URL: https://github.com/apache/arrow-datafusion/pull/3110#discussion_r946001787


##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -45,19 +45,21 @@ impl DateIntervalExpr {
         input_schema: &Schema,
     ) -> Result<Self> {
         match lhs.data_type(input_schema)? {
-            DataType::Date32 | DataType::Date64 => match 
rhs.data_type(input_schema)? {
-                DataType::Interval(_) => match &op {
-                    Operator::Plus | Operator::Minus => Ok(Self { lhs, op, rhs 
}),
-                    _ => Err(DataFusionError::Execution(format!(
-                        "Invalid operator '{}' for DateIntervalExpr",
-                        op
+            DataType::Date32 | DataType::Date64 | DataType::Timestamp(_, _) => 
{
+                match rhs.data_type(input_schema)? {
+                    DataType::Interval(_) => match &op {

Review Comment:
   https://github.com/apache/arrow-datafusion/pull/3150/files proposes renaming 
this structure



##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -45,19 +45,21 @@ impl DateIntervalExpr {
         input_schema: &Schema,
     ) -> Result<Self> {
         match lhs.data_type(input_schema)? {
-            DataType::Date32 | DataType::Date64 => match 
rhs.data_type(input_schema)? {
-                DataType::Interval(_) => match &op {
-                    Operator::Plus | Operator::Minus => Ok(Self { lhs, op, rhs 
}),
-                    _ => Err(DataFusionError::Execution(format!(
-                        "Invalid operator '{}' for DateIntervalExpr",
-                        op
+            DataType::Date32 | DataType::Date64 | DataType::Timestamp(_, _) => 
{
+                match rhs.data_type(input_schema)? {
+                    DataType::Interval(_) => match &op {

Review Comment:
   https://github.com/apache/arrow-datafusion/pull/3150proposes renaming this 
structure



##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -45,19 +45,21 @@ impl DateIntervalExpr {
         input_schema: &Schema,
     ) -> Result<Self> {
         match lhs.data_type(input_schema)? {
-            DataType::Date32 | DataType::Date64 => match 
rhs.data_type(input_schema)? {
-                DataType::Interval(_) => match &op {
-                    Operator::Plus | Operator::Minus => Ok(Self { lhs, op, rhs 
}),
-                    _ => Err(DataFusionError::Execution(format!(
-                        "Invalid operator '{}' for DateIntervalExpr",
-                        op
+            DataType::Date32 | DataType::Date64 | DataType::Timestamp(_, _) => 
{
+                match rhs.data_type(input_schema)? {
+                    DataType::Interval(_) => match &op {

Review Comment:
   https://github.com/apache/arrow-datafusion/pull/3150 proposes renaming this 
structure



-- 
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]

Reply via email to