pub fn parse_statements_extended(sql: &str) -> Result<Vec<Statement>>Expand description
Parse every statement of sql accepting the Spark/Calcite constructs BigQuery lacks, each
desugared to plain BigQuery syntax with the same meaning:
a LEFT SEMI JOIN b ON canda LEFT ANTI JOIN b ON c(aone aliased or named factor that has no joins before) become(SELECT * FROM a WHERE [NOT] EXISTS (SELECT 1 FROM b WHERE c)) AS a;(VALUES (1, 2), (3, 4)) AS t(x, y)becomes(SELECT 1 AS x, 2 AS y UNION ALL SELECT 3, 4) AS t(columns without a list are namedEXPR$0,EXPR$1, …);SUBSTRING(x FROM a FOR b)becomesSUBSTRING(x, a, b);$inside identifiers (EXPR$0) and at the start of one ($f1).
Queries BigQuery accepts parse exactly as with parse_statements.