[ 
https://issues.apache.org/jira/browse/SPARK-52709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wenchen Fan resolved SPARK-52709.
---------------------------------
    Fix Version/s: 4.2.0
       Resolution: Fixed

Issue resolved by pull request 55285
[https://github.com/apache/spark/pull/55285]

> Fix parsing of STRUCT<>
> -----------------------
>
>                 Key: SPARK-52709
>                 URL: https://issues.apache.org/jira/browse/SPARK-52709
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Mihailo Milosevic
>            Priority: Major
>              Labels: pull-request-available, starter
>             Fix For: 4.2.0
>
>
> Currently spark has wrong logic of STRUCT parsing. We introduce up-count of 
> parenthesis for when we see a word STRUCT, not when we see an open 
> parentesis. This leads to the problem when we have STRUCT<>. In lexer NEQ is 
> before LT, which means that we will match STRUCT and NEQ. In this case we 
> would increase the counter, but would never decrease it for the next 
> iterations. This leads to the following query failing with syntax error:
> ```
> SELECT cast(null as STRUCT<>), 2 >> 1;
> ```
> This ticket needs to address the issue of spark not knowing how many 
> parenthesis are present when empty structs are in the loop.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to