Skip to content

Commit

Permalink
Merge pull request #44 from meghanayofficial/feature/Fix-Lexer-issue-…
Browse files Browse the repository at this point in the history
…for-protobuf

Fix Lexer issue for Format type Protobuf
  • Loading branch information
stheppi authored Oct 8, 2021
2 parents 2583d6b + 0257dbc commit 2ee836f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/antlr/ConnectorLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ WITHUNWRAP
;

FORMAT
: 'avro'|'AVRO'|'text'|'TEXT'|'binary'|'BINARY'|'json'|'JSON'|'object'|'OBJECT'|'map'|'MAP'
: 'avro'|'AVRO'|'text'|'TEXT'|'binary'|'BINARY'|'json'|'JSON'|'object'|'OBJECT'|'map'|'MAP'|'protobuf'|'PROTOBUF'
;

PROJECTTO
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/com/datamountaineer/kcql/KcqlTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ public void handleStoredAs() {
String syntax4 = String.format("INSERT INTO %s SELECT * FROM %s WITHFORMAT object", table, topic);
Kcql c4 = Kcql.parse(syntax4);
assertEquals(c4.getFormatType().toString(), "OBJECT");

String syntax5 = String.format("INSERT INTO %s SELECT * FROM %s WITHFORMAT protobuf", table, topic);
Kcql c5 = Kcql.parse(syntax5);
assertEquals(c5.getFormatType().toString(), "PROTOBUF");
}

@Test(expected = IllegalArgumentException.class)
Expand Down

0 comments on commit 2ee836f

Please sign in to comment.