DATE subtract with INTERVAL is not parsed
cdmh opened this issue · 0 comments
cdmh commented
This query from tpc-h
doesn't parse, and reports an error at column 75, inside interval '75'
.
SELECT * FROM lineitem where l_shipdate <= date '1998-12-01' - interval '75' day (3);
This code
REQUIRE(hsql::SQLParser::parse(
"SELECT * FROM lineitem where l_shipdate <= date '1998-12-01' - interval '75' day (3);",
&parser_result) == true);
if (!parser_result.isValid())
std::cerr << parser_result.errorMsg() << " at column " << parser_result.errorColumn();
yields
syntax error, unexpected STRING, expecting end of file at column 75