cloud-fan commented on a change in pull request #24653: [SPARK-27783][SQL] Add
customizable hint error handler
URL: https://github.com/apache/spark/pull/24653#discussion_r286862732
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/hints.scala
##########
@@ -157,3 +158,38 @@ case object SHUFFLE_REPLICATE_NL extends JoinStrategyHint
{
override def hintAliases: Set[String] = Set(
"SHUFFLE_REPLICATE_NL")
}
+
+/**
+ * The callback for implementing customized strategies of handling hint errors.
+ */
+trait HintErrorHandler {
+
+ /**
+ * Callback for an unknown hint.
+ * @param name the unrecognized hint name
+ * @param parameters the hint parameters
+ */
+ def handleHintNotRecognized(name: String, parameters: Seq[Any]): Unit
+
+ /**
+ * Callback for relation names specified in a hint that cannot be associated
with any relation
+ * in the current scope.
+ * @param name the hint name
+ * @param parameters the hint parameters
+ * @param invalidRelations the set of relation names that cannot be
associated
+ */
+ def handleHintRelationsNotFound(
+ name: String, parameters: Seq[Any], invalidRelations: Set[String]): Unit
Review comment:
nit: 4 space indentation
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]