GoogleCloudPlatform / zetasql-toolkit

The ZetaSQL Toolkit is a library that helps users use ZetaSQL Java API to perform SQL analysis for multiple query engines, including BigQuery and Cloud Spanner.
Apache License 2.0
39 stars 10 forks source link

`AnalyzerExtesions` ignores nested function calls #58

Closed ppaglilla closed 5 months ago

ppaglilla commented 5 months ago

AnalyzerExtensions.extractFunctionNames* methods do not handle nested function calls properly. Procedures and TVFs probably have the same issue.

For example, in the following query AnalyzerExtensions.extractFunctionNamesFromStatement() would only return F and would miss G.

SELET F(G(1));
ppaglilla commented 5 months ago

Fixed in version 0.5.2, will be merged to main shortly