fhueske opened a new pull request, #28276:
URL: https://github.com/apache/flink/pull/28276
## What is the purpose of the change
Extend the SQL parser accept the implicit table-function-call form (e.g.
"FROM t, LATERAL fn(args)") in addition to the explicit "LATERAL
TABLE(fn(args))" form.
Mirrors FLINK-36824, which made the TABLE wrapper optional outside LATERAL.
## Brief change log
* adjust `Parser.jj` to accept table function calls in `LATERAL` without
`TABLE` keyword.
* This is another optional parsing path and does not affect existing paths
## Verifying this change
* adjusted Calcite's unit tests in `FlinkSqlParserImplTest` (by overwriting
them) to fix the error positions
* the new parsing rule cause the error positions to slightly shift
* added unit tests in `FlinkSqlParserImplTest`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: **yes**
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? yes
Documentation is adjusted. We now use the shorter, implicit syntax for table
function calls in LATERAL.
The SQL syntax overview is adjusted to cover both cases (LATERAL with and
without TABLE keyword).
Also extended the overview with syntax for non-LATERAL table function calls
with and without TABLE keyword which was missing so far.
I double-checked that the AI-generated Chinese text corresponds to the
English version using Google Translate 🤖
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code 2.1.148 (Opus 4.7)
--
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]