beliefer commented on a change in pull request #31920:
URL: https://github.com/apache/spark/pull/31920#discussion_r607480900
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -1087,4 +1087,42 @@ private[spark] object QueryCompilationErrors {
def cannotConvertDataTypeToParquetTypeError(field: StructField): Throwable =
{
new AnalysisException(s"Unsupported data type
${field.dataType.catalogString}")
}
+
+ def groupAggPandasUDFUnsupportedByStreamingAggError(): Throwable = {
+ new AnalysisException("Streaming aggregation doesn't support group
aggregate pandas UDF")
+ }
+
+ def streamJoinStreamWithoutEqualityPredicateUnsupportedError(plan:
LogicalPlan): Throwable = {
+ new AnalysisException(
+ "Stream-stream join without equality predicate is not supported", plan =
Some(plan))
+ }
+
+ def cannotUseMixtureOfAggFunctionAndGroupAggPandasUDFError(): Throwable = {
+ new AnalysisException(
+ "Cannot use a mixture of aggregate function and group aggregate pandas
UDF")
+ }
+
+ def ambiguousAttributesInSelfJoinError(
+ ambiguousAttrs: Seq[AttributeReference]): Throwable = {
+ new AnalysisException(
+ s"""
+ |Column ${ambiguousAttrs.mkString(", ")} are ambiguous. It's probably
because
+ |you joined several Datasets together, and some of these Datasets are
the same.
+ |This column points to one of the Datasets but Spark is unable to
figure out
+ |which one. Please alias the Datasets with different names via
`Dataset.as`
+ |before joining them, and specify the column using qualified name,
e.g.
+ |`df.as("a").join(df.as("b"), $$"a.id" > $$"b.id")`. You can also set
+ |${SQLConf.FAIL_AMBIGUOUS_SELF_JOIN_ENABLED.key} to false to disable
this check.
+ """.stripMargin.replaceAll("\n", " "))
+ }
+
+ def unexpectedEvalTypesForUDFsError(evalTypes: Set[Int]): Throwable = {
+ new AnalysisException(
+ s"Expected udfs have the same evalType but got different evalTypes: " +
Review comment:
This PR just group exception messages. There need other PR to improve
messages.
--
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]