Skip to content

Conversation

@srielau
Copy link
Contributor

@srielau srielau commented Sep 12, 2023

What changes were proposed in this pull request?

Due to a quirk in the parser, in some cases, IDENTIFIER()() is not properly recognized as a function invocation.

The change is to remove the explicit IDENTIFIER-clause rule in the function invocation grammar and instead recognize
IDENTIFIER() within visitFunctionCall.

Why are the changes needed?

Function invocation support for IDENTIFIER is incomplete otherwise

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added new testcases to identifier-clause.sql

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Sep 12, 2023
@cloud-fan
Copy link
Contributor

The failed pyspark test is unrelated. Thanks, merging to master/3.5!

@cloud-fan cloud-fan closed this in f0b2e6d Oct 12, 2023
cloud-fan added a commit that referenced this pull request Oct 12, 2023
### What changes were proposed in this pull request?

Due to a quirk in the parser, in some cases, IDENTIFIER(<funcStr>)(<arg>) is not properly recognized as a function invocation.

The change is to remove the explicit IDENTIFIER-clause rule in the function invocation grammar and instead recognize
IDENTIFIER(<arg>) within visitFunctionCall.

### Why are the changes needed?

Function invocation support for IDENTIFIER is incomplete otherwise

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Added new testcases to identifier-clause.sql

### Was this patch authored or co-authored using generative AI tooling?

No

Closes #42888 from srielau/SPARK-45132.

Lead-authored-by: srielau <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit f0b2e6d)
Signed-off-by: Wenchen Fan <[email protected]>
turboFei pushed a commit to turboFei/spark that referenced this pull request Nov 6, 2025
### What changes were proposed in this pull request?

Due to a quirk in the parser, in some cases, IDENTIFIER(<funcStr>)(<arg>) is not properly recognized as a function invocation.

The change is to remove the explicit IDENTIFIER-clause rule in the function invocation grammar and instead recognize
IDENTIFIER(<arg>) within visitFunctionCall.

### Why are the changes needed?

Function invocation support for IDENTIFIER is incomplete otherwise

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Added new testcases to identifier-clause.sql

### Was this patch authored or co-authored using generative AI tooling?

No

Closes apache#42888 from srielau/SPARK-45132.

Lead-authored-by: srielau <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit f0b2e6d)
Signed-off-by: Wenchen Fan <[email protected]>

* fix

---------

Signed-off-by: Wenchen Fan <[email protected]>
Co-authored-by: srielau <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants