olivrlee commented on code in PR #3009:
URL: https://github.com/apache/calcite/pull/3009#discussion_r1066431760


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -5050,6 +5050,86 @@ SqlIntervalQualifier TimeUnitOrName() : {
     }
 }
 
+  SqlIntervalQualifier TimeUnitOrNameForDateTrunc() : {
+    final TimeUnit timeUnit;
+    final SqlIntervalQualifier weekdayIntervalQualifier;
+    final SqlIdentifier unitName;
+}
+{
+    LOOKAHEAD(1)
+    timeUnit = TimeUnitForDateTrunc() {
+        return new SqlIntervalQualifier(timeUnit, null, getPos());
+    }
+|
+    weekdayIntervalQualifier = WeekWeekdaySqlIntervalQualifier() {
+        return weekdayIntervalQualifier;
+    }
+|
+    unitName = DateTruncIdentifiers() {

Review Comment:
   I will change parser to allow custom time frames and have the operands be a 
super set of what BigQuery enables 



-- 
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: commits-unsubscr...@calcite.apache.org

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

Reply via email to