spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitko Kolev (JIRA)" <>
Subject [jira] [Created] (SPARK-19363) order by cannot be parsed when group by is missing
Date Wed, 25 Jan 2017 16:39:26 GMT
Mitko Kolev created SPARK-19363:

             Summary: order by cannot be parsed when group by is missing
                 Key: SPARK-19363
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.0.2
            Reporter: Mitko Kolev

The order by cannot be parsed, when there is no group by expression.  This used to work in
spark 1.6, but seems broken in Spark 2.0.2.

If there is a group by expression, order by can be parsed.
{{select a, b from blah group by a, b order by a desc}}  

Without a group by
{{select a, b from blah order by a desc}} results in the exception below. 

	at org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:197)
	at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:99)
	at org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:45)
	at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:53)
	at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:582)
	at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:682)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.zeppelin.spark.SparkSqlInterpreter.interpret(
	at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(
	at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(
	at org.apache.zeppelin.scheduler.FIFOScheduler$
	at java.util.concurrent.Executors$
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
	at java.util.concurrent.ScheduledThreadPoolExecutor$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message