beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535861041
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in
the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases:
Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list
$groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with
GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not
supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but
'$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t:
TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
Review comment:
OK
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]