I'm fairly new to Spark and I was wondering if there is a way to specifically know whether a given query is a DML or a DDL statement via the SparkContext
/SQLContext
APIs?
I was looking at AstBuilder.scala and SparkSqlParser.scala but looks like they parse the query into an AST using visit callback methods and call different functions in ddl.scala.
If not, how would you go about implementing a method which would tell us that using the Spark SQLContext
APIs?