alamb commented on code in PR #14255:
URL: https://github.com/apache/datafusion/pull/14255#discussion_r1927795033
##########
datafusion/sqllogictest/test_files/interval.slt:
##########
@@ -25,27 +25,10 @@ select
Interval(MonthDayNano) Interval(MonthDayNano)
-## This is incredibly confusing but document it in tests:
-#
-# years is parsed as a column name
-# year is parsed as part of the interval type.
-#
-# postgres=# select interval '5' year;
-# interval
-# ----------
-# 5 years
-# (1 row)
-#
-# postgres=# select interval '5' years;
-# years
-# ----------
-# 00:00:05
-# (1 row)
query ?
select interval '5' years
----
-5.000000000 secs
-
+60 mons
Review Comment:
this certainly seems much more correct to me -- I also removed the now out
of date comment.
##########
datafusion/sql/src/expr/mod.rs:
##########
@@ -984,84 +984,141 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
Ok(Expr::Cast(Cast::new(Box::new(expr), dt)))
}
- fn sql_subscript_to_expr(
+ fn sql_compound_field_access_to_expr(
Review Comment:
The code to plan CompoundFieldAccess is directly copy/pasted from @goldmedal
's PR
- https://github.com/apache/datafusion/pull/13734
--
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]