[ https://issues.apache.org/jira/browse/BEAM-9149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kyle Weaver updated BEAM-9149: ------------------------------ Status: Open (was: Triage Needed) > Support ZetaSQL positional parameters > ------------------------------------- > > Key: BEAM-9149 > URL: https://issues.apache.org/jira/browse/BEAM-9149 > Project: Beam > Issue Type: New Feature > Components: dsl-sql-zetasql > Reporter: Kyle Weaver > Assignee: Kyle Weaver > Priority: Major > > While they are not yet exposed to the end user, ZetaSQL query parameters are > currently being passed internally. However, the existing code assumes that > all parameters are named parameters, not positional parameters. To support > positional parameters, we will need to make at least the following changes: > 1) Set mode to PARAMETER_POSITIONAL and use addPositionalQueryParameter > instead of addQueryParameter in SqlAnalyzer: > https://github.com/apache/beam/blob/671b02ac5f1be87a591de8f5f456d0e5a199d771/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/SqlAnalyzer.java#L119 > 2) Code currently assumes that resolved parameters are named. While even > positional parameters must be named when they are used as inputs, after they > are resolved their names are removed. Thus this check will deref a null > pointer and must be fixed: > https://github.com/apache/beam/blob/8915d6e95c405aeee0f29152545d3210e8e09f1f/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/ExpressionConverter.java#L1004 -- This message was sent by Atlassian Jira (v8.3.4#803005)