You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're now getting into the more difficult ambiguities with the grammar. And, we're making great progress in the speed of the parse: It now takes ~9s to parse all the input, compared to ~42s (note, both tests are without parsing function bodies). Before disabling function body parsing, parsing the entire test suite was ~45s.
Consider the input SELECT c, sum(a) FROM pagg_tab GROUP BY rollup(c) ORDER BY 1, 2;. This can be parsed two ways.
The problem here is described in the comments of gram.y:
To support CUBE and ROLLUP in GROUP BY without reserving them, we give them an explicit priority lower than '(', so that a rule with CUBE '(' will shift rather than reducing a conflicting rule that takes CUBE as a function name. Using the same precedence as IDENT seems right for the reasons given above.
The text was updated successfully, but these errors were encountered:
The parse of the ~200 files in the test suite takes about 8s. Of those files, 22 account for about 4s of the parse time, or roughly half of the total time. Each of these files has at least 2 ambiguities, but some with many more.
$ trperf -c aFT `./bin/Debug/net8.0/Test.exe ../examples/*.sql 2>&1 | sort -k5 -n | tail -22 | awk '{ print $3 }'` | grep -v '^0' | a
wk '{sum[$2] += $1; t[$2] = $3} END {for (key in sum) print sum[key], key, t[key]}'
Time to parse: 00:00:00.9262392
Time to parse: 00:00:00.1319337
Time to parse: 00:00:00.5084517
Time to parse: 00:00:00.3196001
Time to parse: 00:00:00.0623989
Time to parse: 00:00:00.0606131
Time to parse: 00:00:00.2406571
Time to parse: 00:00:00.0075491
Time to parse: 00:00:00.3437588
Time to parse: 00:00:00.2272951
Time to parse: 00:00:00.1225716
Time to parse: 00:00:00.1394496
Time to parse: 00:00:00.3754469
Time to parse: 00:00:00.3107465
Time to parse: 00:00:00.5222603
Time to parse: 00:00:00.3044987
Time to parse: 00:00:00.1419571
Time to parse: 00:00:00.1310350
Time to parse: 00:00:00.0001130
Time to parse: 00:00:00.0012748
Time to parse: 00:00:00.0001265
Time to parse: 00:00:00.0002339
2 ../examples/with.sql 0.014354
1 ../examples/partition_aggregate.sql 0.01336
73 ../examples/window.sql 0.179842
8 ../examples/rowsecurity.sql 0.798974
3 ../examples/opr_sanity.sql 0.990225
51 ../examples/groupingsets.sql 0.707481
7 ../examples/subselect.sql 0.601385
32 ../examples/join.sql 3.245541
6 ../examples/tsrf.sql 0.090786
10 ../examples/partition_join.sql 0.853429
We're now getting into the more difficult ambiguities with the grammar. And, we're making great progress in the speed of the parse: It now takes ~9s to parse all the input, compared to ~42s (note, both tests are without parsing function bodies). Before disabling function body parsing, parsing the entire test suite was ~45s.
Consider the input
SELECT c, sum(a) FROM pagg_tab GROUP BY rollup(c) ORDER BY 1, 2;
. This can be parsed two ways.The problem here is described in the comments of gram.y:
The text was updated successfully, but these errors were encountered: