Skip to main content

parse_spark_sql

Function parse_spark_sql 

Source
pub fn parse_spark_sql(query: &str) -> Result<SparkStatement, ParseError>
Expand description

Parse a Spark/PySpark-compatible SQL string.

  • First, fast-path Spark-only command variants (e.g. DESCRIBE DETAIL, SHOW TABLES IN db, DESCRIBE t col).
  • Otherwise, fall back to upstream sqlparser and return SparkStatement::Sqlparser.
  • Always enforces exactly one statement per call.