spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <>
Subject Re: Reporting errors from spark sql
Date Sun, 21 Aug 2016 16:27:42 GMT

to learn how Spark SQL parses SQL texts. It could give you a way out.

Jacek Laskowski
Mastering Apache Spark 2.0
Follow me at

On Thu, Aug 18, 2016 at 3:14 PM, yael aharon <> wrote:
> Hello,
> I am working on an SQL editor which is powered by spark SQL. When the SQL is
> not valid, I would like to provide the user with a line number and column
> number where the first error occurred. I am having a hard time finding a
> mechanism that will give me that information programmatically.
> Most of the time, if an erroneous SQL statement is used, I am getting a
> RuntimeException, where line number and column number are implicitly
> embedded within the text of the message, but it is really error prone to
> parse the message text and count the number of spaces prior to the '^'
> symbol...
> Sometimes, AnalysisException is used, but when I try to extract the line and
> startPosition from it, they are always empty.
> Any help would be greatly appreciated.
> thanks!

To unsubscribe e-mail:

View raw message