tanclary opened a new pull request, #3048:
URL: https://github.com/apache/calcite/pull/3048

   The previous check that differentiated BigQuery's TIMESTAMP_DIFF(time, 
time2, timeUnit) and the standard TIMESTAMPDIFF(timeUnit, time, time2) checked 
whether the first argument was a literal or not. This meant that if a "flag" 
literal was passed in as the time unit for the standard TIMESTAMPDIFF, it would 
be handled as though it were BigQuery's TIMESTAMP_DIFF. This led to errors such 
as the one seen in the original JIRA case. The fix avoids this problem by 
modifying the check to determine whether the first argument is in the DATETIME 
SqlTypeFamily. BigQuery's TIMESTAMP_DIFF's first argument should always be in 
this family, while the standard TIMESTAMPDIFF's datetime arguments should 
always be the second and third operands.


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