Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 15ec777

Browse files
committed
Fix warnings in DDL parser
1 parent 1d36af9 commit 15ec777

File tree

1 file changed

+5
-2
lines changed
  • omniscidb/Calcite/java/calcite/src/main/codegen/includes

1 file changed

+5
-2
lines changed

omniscidb/Calcite/java/calcite/src/main/codegen/includes/ddlParser.ftl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ SqlTypeNameSpec OmniSciGeospatialTypeName(Span s) :
270270
}
271271
)
272272
<LPAREN> geoType = OmniSciGeoType() [ <COMMA> coordinateSystem = IntLiteral() ] <RPAREN>
273-
[ encoding = OmniSciEncodingOpt() ]
273+
[ LOOKAHEAD(2) encoding = OmniSciEncodingOpt() ]
274274
)
275275
{
276276
return new OmniSciGeoTypeNameSpec(geoType, coordinateSystem, isGeography, encoding, s.end(this));
@@ -471,7 +471,7 @@ Pair<String, SqlNode> KVOption() :
471471
<EQ>
472472
{ s = span(); }
473473
(
474-
<NULL> { value = SqlLiteral.createCharString("", s.end(this)); }
474+
LOOKAHEAD(2) <NULL> { value = SqlLiteral.createCharString("", s.end(this)); }
475475
|
476476
value = Literal()
477477
)
@@ -719,6 +719,7 @@ SqlNode WrappedOrderedQueryOrExpr(ExprContext exprContext) :
719719
final SqlNode query;
720720
}
721721
{
722+
LOOKAHEAD(3)
722723
<LPAREN>
723724
query = OrderedQueryOrExpr(exprContext)
724725
<RPAREN>
@@ -1077,6 +1078,7 @@ SqlDdl SqlGrant(Span si) :
10771078
{
10781079
<GRANT> { s = span(); }
10791080
(
1081+
LOOKAHEAD(3)
10801082
nodeList = privilegeList()
10811083
grant = SqlGrantPrivilege(s, nodeList)
10821084
|
@@ -1105,6 +1107,7 @@ SqlDdl SqlRevoke(Span si) :
11051107
{
11061108
<REVOKE> { s = span(); }
11071109
(
1110+
LOOKAHEAD(3)
11081111
nodeList = privilegeList()
11091112
revoke = SqlRevokePrivilege(s, nodeList)
11101113
|

0 commit comments

Comments
 (0)