Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ case class Alias(child: Expression, name: String)
}
}

override def toString: String = s"$child AS $name#${exprId.id}$typeSuffix"
override def toString: String = s"$child AS $name#${exprId.id}"

override protected final def otherCopyArgs = exprId :: qualifiers :: Nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import scala.util.Try
import org.apache.hadoop.hive.conf.HiveConf.ConfVars

import org.apache.spark.{SparkFiles, SparkException}
import org.apache.spark.sql.{DataFrame, Row}
import org.apache.spark.sql.{AnalysisException, DataFrame, Row}
import org.apache.spark.sql.catalyst.plans.logical.Project
import org.apache.spark.sql.Dsl._
import org.apache.spark.sql.hive._
Expand Down Expand Up @@ -575,6 +575,12 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
}
}

test("analyzer should not throw NotImplementedError") {
intercept[AnalysisException] {
sql("SELECT CAST(x AS STRING) FROM src").collect()
}
}

def isExplanation(result: DataFrame) = {
val explanation = result.select('plan).collect().map { case Row(plan: String) => plan }
explanation.contains("== Physical Plan ==")
Expand Down