cloud-fan commented on a change in pull request #33666:
URL: https://github.com/apache/spark/pull/33666#discussion_r684288897



##########
File path: sql/core/src/test/resources/sql-tests/inputs/date.sql
##########
@@ -91,6 +91,11 @@ create temp view v as select '1' str;
 select date_add('2011-11-11', str) from v;
 select date_sub('2011-11-11', str) from v;
 
+-- non-literal string column add/sub with integer
+create or replace temp view v2 as select '2011-11-11' str;

Review comment:
       nit: let's remove `or replace`. It's always error-prone if we replace a 
temp view in the test, as we may change the rest of the test cases.

##########
File path: sql/core/src/test/resources/sql-tests/inputs/timestamp.sql
##########
@@ -102,6 +102,8 @@ select timestamp'2011-11-11 11:11:11' - interval '2' second;
 select '2011-11-11 11:11:11' - interval '2' second;
 select '1' - interval '2' second;
 select 1 - interval '2' second;
+create or replace temp view v as select '2011-11-11' str;

Review comment:
       ditto

##########
File path: sql/core/src/test/resources/sql-tests/inputs/timestamp.sql
##########
@@ -102,6 +102,8 @@ select timestamp'2011-11-11 11:11:11' - interval '2' second;
 select '2011-11-11 11:11:11' - interval '2' second;
 select '1' - interval '2' second;
 select 1 - interval '2' second;
+create or replace temp view v as select '2011-11-11' str;
+select str - interval '2' second from v;

Review comment:
       -- non-literal string column subtract interval

##########
File path: sql/core/src/test/resources/sql-tests/inputs/timestamp.sql
##########
@@ -102,6 +102,8 @@ select timestamp'2011-11-11 11:11:11' - interval '2' second;
 select '2011-11-11 11:11:11' - interval '2' second;
 select '1' - interval '2' second;
 select 1 - interval '2' second;
+create or replace temp view v as select '2011-11-11' str;
+select str - interval '2' second from v;

Review comment:
       -- non-literal string column subtract interval




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

Reply via email to