cloud-fan commented on PR #51480: URL: https://github.com/apache/spark/pull/51480#issuecomment-3196290672
This PR introduced a regression. `complex_type_level_counter` is increased when the lexer sees `STRUCR`/`ARRAY`/`MAP`. However, `STRUCR`/`ARRAY`/`MAP` are also function names and `ARRAY(col1 <> col2)` should be allowed. That being said, `complex_type_level_counter` itself already has bugs and `ARRAY(col >> 1)` should be allowed but not today. I think we can't disambiguate it at the lexer side, but we should handle it at the parser. For example, `STRUCT<>` can be an empty struct type, but can also be part of `struct <> another_col`. Let me revert this PR first. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
