Skip to content

Commit

Permalink
RD-14937: t.* not parsed in SqlCompilerService (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaidioz authored Nov 14, 2024
1 parent 34ddcf5 commit b54ada7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,4 +1210,20 @@ class TestSqlCompilerServiceAirports
)
assert(baos.toString() === """[{"r":{"a":"1","b":"tralala"}}]""")
}

test("SELECT a.* FROM example.airports a ORDER BY airport_id LIMIT 1") { t =>
val baos = new ByteArrayOutputStream()
assert(
compilerService.execute(
t.q,
asCsv(),
None,
baos
) == ExecutionSuccess(true)
)
assert(baos.toString() === """airport_id,name,city,country,iata_faa,icao,latitude,longitude,altitude,timezone,dst,tz
|1,Goroka,Goroka,Papua New Guinea,GKA,AYGA,-6.081689,145.391881,5282.000,10,U,Pacific/Port_Moresby
|""".stripMargin)

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ proj: idnt (DOT idnt)+ #p
| idnt DOT {notifyErrorListeners("Missing identifier after '.'");} #missingIdenProj
;

idnt: (WORD | STRING_IDENTIFIER_START (STRING_IDENTIFIER_CONTENT | STRING_ESCAPE)* STRING_IDENTIFIER_END? | non_reserved_keyword);
idnt: (WORD | STRING_IDENTIFIER_START (STRING_IDENTIFIER_CONTENT | STRING_ESCAPE)* STRING_IDENTIFIER_END? | non_reserved_keyword | STAR);


literal: STRING_LITERAL_START STRING_LITERAL_CONTENT* STRING_LITERAL_END #stringLiteral
Expand Down

0 comments on commit b54ada7

Please sign in to comment.