Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Feb 15, 2017

What changes were proposed in this pull request?

A follow-up to disallow space as the delimiter in broadcast hint.

How was this patch tested?

Jenkins test.

Please review http://spark.apache.org/contributing.html before opening a pull request.

@viirya
Copy link
Member Author

viirya commented Feb 15, 2017

cc @rxin @dongjoon-hyun @cloud-fan

assert(m2.contains("mismatched input '.' expecting {')', ','}"))

// Disallow space as the delimiter.
val m3 = intercept[ParseException] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: You can use the PlanParserSuite.intercept method. That saves some typing.

@hvanhovell
Copy link
Contributor

LGTM pending jenkins


comparePlans(
parsePlan("SELECT /*+ INDEX(t emp_job_ix) */ * FROM t"),
parsePlan("SELECT /*+ INDEX(t, emp_job_ix) */ * FROM t"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this test now, as it's duplicated if we use , as delimiter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @viirya and @cloud-fan @hvanhovell @rxin @gatorsmile .

Just for explanation, it was originally designed to support other syntax like the followings. Except query block parts (which we don't support), this case means tableSpec and indexSpec.

https://docs.oracle.com/cd/B12037_01/server.101/b10752/hintsref.htm#21629

At that time, there was a request to provide more general syntax to prevent future changes on SqlBase.g4 layer.

Anyway, I have no objection on the current approach since I also read the comments between @rxin and @viirya on the previous @rxin 's commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea we can generalize it later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongjoon-hyun Thanks for explanation. Looks like the syntax you referred only supports space as the delimiter?

@SparkQA
Copy link

SparkQA commented Feb 15, 2017

Test build #72940 has finished for PR 16941 at commit 23982b1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Feb 15, 2017

Merging in master.

@asfgit asfgit closed this in acf71c6 Feb 15, 2017
cmonkey pushed a commit to cmonkey/spark that referenced this pull request Feb 16, 2017
… the delimiter

## What changes were proposed in this pull request?

A follow-up to disallow space as the delimiter in broadcast hint.

## How was this patch tested?

Jenkins test.

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: Liang-Chi Hsieh <[email protected]>

Closes apache#16941 from viirya/disallow-space-delimiter.
@viirya viirya deleted the disallow-space-delimiter branch December 27, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants