[
https://issues.apache.org/jira/browse/BEAM-9178?focusedWorklogId=381262&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-381262
]
ASF GitHub Bot logged work on BEAM-9178:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/20 00:10
Start Date: 04/Feb/20 00:10
Worklog Time Spent: 10m
Work Description: apilloud commented on pull request #10634: [BEAM-9178]
Support all ZetaSQL TIMESTAMP functions
URL: https://github.com/apache/beam/pull/10634#discussion_r374410033
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/ExpressionConverter.java
##########
@@ -770,88 +765,34 @@ private RexNode convertResolvedFunctionCall(
throw new UnsupportedOperationException(
"Only support TUMBLE, HOP AND SESSION functions right now.");
}
- } else if (functionCall.getFunction().getGroup().equals("ZetaSQL")) {
- op =
-
SqlStdOperatorMappingTable.ZETASQL_FUNCTION_TO_CALCITE_SQL_OPERATOR.get(
- functionCall.getFunction().getName());
-
+ } else if ("ZetaSQL".equals(funGroup)) {
if (op == null) {
- throw new UnsupportedOperationException(
- "Does not support ZetaSQL function: " +
functionCall.getFunction().getName());
+ TypeKind returnType =
+
SqlStdOperatorMappingTable.ZETASQL_FUNCTION_NAME_TO_RETURN_TYPE.get(funName);
Review comment:
Manually maintaining this list seems like no fun. What about using
`functionCall.getSignature().getResultType().getType()`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 381262)
> Support ZetaSQL TIMESTAMP functions in BeamSQL
> ----------------------------------------------
>
> Key: BEAM-9178
> URL: https://issues.apache.org/jira/browse/BEAM-9178
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql-zetasql
> Reporter: Yueyang Qiu
> Assignee: Yueyang Qiu
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Support *all* TIMESTAMP functions defined in ZetaSQL (BigQuery Standard SQL).
> See the full list of functions below:
> [https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)