[ https://issues.apache.org/jira/browse/SPARK-52709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18005064#comment-18005064 ]
Mihailo Milosevic commented on SPARK-52709: ------------------------------------------- Great. If you need a review please ping me on the PR. > 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: starter > > 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: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org