Skip to content

Commit

Permalink
fixed merged + space instead of comma for multiple hints syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanrdc committed May 26, 2017
1 parent d386cdf commit 6e40301
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ querySpecification
;

hint
: '/*+' hintStatements+=hintStatement (',' hintStatements+=hintStatement)* '*/'
: '/*+' hintStatements+=hintStatement (hintStatements+=hintStatement)* '*/'
;

hintStatement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ class PlanParserSuite extends PlanTest {

test("SPARK-20854: multiple hints") {
comparePlans(
parsePlan("SELECT /*+ HINT1(a, 1), hint2(b, 2) */ * from t"),
parsePlan("SELECT /*+ HINT1(a, 1) hint2(b, 2) */ * from t"),
UnresolvedHint("hint2", Seq($"b", Literal(2)),
UnresolvedHint("HINT1", Seq($"a", Literal(1)),
table("t").select(star())
Expand Down
2 changes: 1 addition & 1 deletion sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ class Dataset[T] private[sql](
* @since 2.2.0
*/
@scala.annotation.varargs
def hint(name: String, parameters: String*): Dataset[T] = withTypedPlan {
def hint(name: String, parameters: Any*): Dataset[T] = withTypedPlan {
UnresolvedHint(name, parameters, planWithBarrier)
}

Expand Down

0 comments on commit 6e40301

Please sign in to comment.