when people execute Spark-SQL by:
./bin/spark-sqlto execute THE-QUERY on the command line OR./bin/spark-submit -f X.sqlto execute THE-QUERY by a sql file
What exactly THE-QUERY is cannot be seen on the Spark WebUI or history server.
It is hard to trace the source sql when exception happens. So I am wondering if Spark itself actually has some features to log the submitted SQL ?