majian1998 opened a new pull request, #13625: URL: https://github.com/apache/iceberg/pull/13625
Spark SQL uses a parser chain to convert SQL text into logical plans for execution. Many extensions (such as Iceberg, Paimon, etc.) register their own SQL parsers by wrapping the underlying parser with their delegate implementation. This allows the extension to handle custom syntax, while delegating standard SQL to the next parser in the chain. In the previous code, some Spark/Iceberg logic checked only the outer-most parser instance to determine if it was an ExtendedParser. However, when multiple extensions are stacked (for example, when the Paimon parser delegates to the Iceberg parser), this check fails, as the top-level parser is not an instance of ExtendedParser. As a result, features that depend on the Iceberg parser's capabilities (such as custom parseSortOrder logic) would not work in such environments. This PR updates the detection logic to recursively unwrap delegate parsers until it finds an ExtendedParser instance, ensuring compatibility with extension chains and improving robustness when integrating with multiple Spark SQL extensions. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org