Github user bogdanrdc commented on a diff in the pull request: https://github.com/apache/spark/pull/18086#discussion_r118661387 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/hints.scala --- @@ -25,7 +25,7 @@ import org.apache.spark.sql.internal.SQLConf * should be removed This node will be eliminated post analysis. * A pair of (name, parameters). */ -case class UnresolvedHint(name: String, parameters: Seq[String], child: LogicalPlan) +case class UnresolvedHint(name: String, parameters: Seq[Any], child: LogicalPlan) --- End diff -- If we use Expression then either: * Dataset.hint parameters should be Expression too, in which case you can't do `df.hint("hint", 1, 2, "c")` you'd have to do `df.hint("hint", Literal(1), Literal(2), Literal("c"))` or a shortcut if there is * Dataset.hint accepts Any but then has to convert Any to Expressions. One problem here is that Seq(1,2,3) can't be converted to Literal. So you have to use `df.hint("hint", Array(1,2,3))` The disadvantage of have Any in UnresolvedHint is that to resolve the hint you have to check both for String and Literal(String) but the API is easier to use.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org