Skip to content

Commit 3ea8fe7

Browse files
committed
fix: disambiguate BigQuery AS STRUCT/VALUE qualifier from select tail
Making the select-items group optional for the target-less PostgreSQL SELECT let JavaCC see K_AS in the follow set of the optional AS STRUCT/VALUE qualifier block, producing a choice conflict at the block. Guard it with an explicit lookahead so AS only opens the qualifier when STRUCT or VALUE comes next.
1 parent 1ecee1f commit 3ea8fe7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8974,7 +8974,7 @@ PlainSelect PlainSelect() #PlainSelect:
89748974
}
89758975
}
89768976

8977-
[
8977+
[ LOOKAHEAD(<K_AS> (<K_STRUCT> | <K_VALUE>))
89788978
<K_AS>
89798979
(
89808980
<K_STRUCT> { plainSelect.setBigQuerySelectQualifier( PlainSelect.BigQuerySelectQualifier.AS_STRUCT ); }

0 commit comments

Comments
 (0)