Skip to content

Conversation

@scwf
Copy link
Contributor

@scwf scwf commented May 1, 2015

based on #4015, we should not delete sqlParser from sqlcontext, that leads to mima failed. Users implement dialect to give a fallback for sqlParser and we should construct sqlParser in sqlcontext according to the dialect
protected[sql] val sqlParser = new SparkSQLParser(getSQLDialect().parse(_))

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31518 has finished for PR 5827 at commit c19780b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class Dialect
    • class DialectException(msg: String, cause: Throwable) extends Exception(msg, cause)
  • This patch does not change any dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this comment? It's probably confused once this PR merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@chenghao-intel
Copy link
Contributor

Thank you @scwf for the fixing. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chenghao-intel this sqlparser actually will not be used for now, place here just to fix mima test

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd better keep it, not just for the mima test, but also for the sub class of Dialect. e.g. we have to specify the SparkSQLParser for HiveQLDialect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree to keep it, and in dialect parser we should not use SparkSQLParser. Dialect give a fallback(string -> logicalplan) and we call it in sqlParser

@scwf
Copy link
Contributor Author

scwf commented May 1, 2015

Retest this please

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31566 has finished for PR 5827 at commit 0878bd1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class Dialect
    • class DialectException(msg: String, cause: Throwable) extends Exception(msg, cause)

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31573 timed out for PR 5827 at commit 81b9737 after a configured wait of 150m.

@scwf
Copy link
Contributor Author

scwf commented May 1, 2015

retest this please

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31605 has finished for PR 5827 at commit 81b9737.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class Dialect
    • class DialectException(msg: String, cause: Throwable) extends Exception(msg, cause)

@scwf
Copy link
Contributor Author

scwf commented May 2, 2015

@marmbrus any comment here?

@asfgit asfgit closed this in 5d6b90d May 2, 2015
@scwf scwf deleted the sqlparser1 branch May 3, 2015 00:46
asfgit pushed a commit that referenced this pull request May 7, 2015
This is a follow up of #5827 to remove the additional `SparkSQLParser`

Author: Cheng Hao <[email protected]>

Closes #5965 from chenghao-intel/remove_sparksqlparser and squashes the following commits:

509a233 [Cheng Hao] Remove the HiveQlQueryExecution
a5f9e3b [Cheng Hao] Remove the duplicated SparkSQLParser

(cherry picked from commit 074d75d)
Signed-off-by: Michael Armbrust <[email protected]>
asfgit pushed a commit that referenced this pull request May 7, 2015
This is a follow up of #5827 to remove the additional `SparkSQLParser`

Author: Cheng Hao <[email protected]>

Closes #5965 from chenghao-intel/remove_sparksqlparser and squashes the following commits:

509a233 [Cheng Hao] Remove the HiveQlQueryExecution
a5f9e3b [Cheng Hao] Remove the duplicated SparkSQLParser
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request May 28, 2015
based on apache#4015, we should not delete `sqlParser` from sqlcontext, that leads to mima failed. Users implement dialect to give a fallback for `sqlParser`  and we should construct `sqlParser` in sqlcontext according to the dialect
`protected[sql] val sqlParser = new SparkSQLParser(getSQLDialect().parse(_))`

Author: Cheng Hao <[email protected]>
Author: scwf <[email protected]>

Closes apache#5827 from scwf/sqlparser1 and squashes the following commits:

81b9737 [scwf] comment fix
0878bd1 [scwf] remove comments
c19780b [scwf] fix mima tests
c2895cf [scwf] Merge branch 'master' of https://github.com/apache/spark into sqlparser1
493775c [Cheng Hao] update the code as feedback
81a731f [Cheng Hao] remove the unecessary comment
aab0b0b [Cheng Hao] polish the code a little bit
49b9d81 [Cheng Hao] shrink the comment for rebasing
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request May 28, 2015
This is a follow up of apache#5827 to remove the additional `SparkSQLParser`

Author: Cheng Hao <[email protected]>

Closes apache#5965 from chenghao-intel/remove_sparksqlparser and squashes the following commits:

509a233 [Cheng Hao] Remove the HiveQlQueryExecution
a5f9e3b [Cheng Hao] Remove the duplicated SparkSQLParser
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
based on apache#4015, we should not delete `sqlParser` from sqlcontext, that leads to mima failed. Users implement dialect to give a fallback for `sqlParser`  and we should construct `sqlParser` in sqlcontext according to the dialect
`protected[sql] val sqlParser = new SparkSQLParser(getSQLDialect().parse(_))`

Author: Cheng Hao <[email protected]>
Author: scwf <[email protected]>

Closes apache#5827 from scwf/sqlparser1 and squashes the following commits:

81b9737 [scwf] comment fix
0878bd1 [scwf] remove comments
c19780b [scwf] fix mima tests
c2895cf [scwf] Merge branch 'master' of https://github.com/apache/spark into sqlparser1
493775c [Cheng Hao] update the code as feedback
81a731f [Cheng Hao] remove the unecessary comment
aab0b0b [Cheng Hao] polish the code a little bit
49b9d81 [Cheng Hao] shrink the comment for rebasing
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
This is a follow up of apache#5827 to remove the additional `SparkSQLParser`

Author: Cheng Hao <[email protected]>

Closes apache#5965 from chenghao-intel/remove_sparksqlparser and squashes the following commits:

509a233 [Cheng Hao] Remove the HiveQlQueryExecution
a5f9e3b [Cheng Hao] Remove the duplicated SparkSQLParser
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
based on apache#4015, we should not delete `sqlParser` from sqlcontext, that leads to mima failed. Users implement dialect to give a fallback for `sqlParser`  and we should construct `sqlParser` in sqlcontext according to the dialect
`protected[sql] val sqlParser = new SparkSQLParser(getSQLDialect().parse(_))`

Author: Cheng Hao <[email protected]>
Author: scwf <[email protected]>

Closes apache#5827 from scwf/sqlparser1 and squashes the following commits:

81b9737 [scwf] comment fix
0878bd1 [scwf] remove comments
c19780b [scwf] fix mima tests
c2895cf [scwf] Merge branch 'master' of https://github.com/apache/spark into sqlparser1
493775c [Cheng Hao] update the code as feedback
81a731f [Cheng Hao] remove the unecessary comment
aab0b0b [Cheng Hao] polish the code a little bit
49b9d81 [Cheng Hao] shrink the comment for rebasing
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
This is a follow up of apache#5827 to remove the additional `SparkSQLParser`

Author: Cheng Hao <[email protected]>

Closes apache#5965 from chenghao-intel/remove_sparksqlparser and squashes the following commits:

509a233 [Cheng Hao] Remove the HiveQlQueryExecution
a5f9e3b [Cheng Hao] Remove the duplicated SparkSQLParser
@rxin
Copy link
Contributor

rxin commented Jan 14, 2016

@scwf are you guys using this feature? I'm thinking about just removing it in Spark 2.0.

@chenghao-intel who wanted it in the first place no longer needs it.

@scwf
Copy link
Contributor Author

scwf commented Jan 14, 2016

@rxin, yes we used this and we implements a new sqlparser based on this interface to support ANSI tpcds sql.

@rxin
Copy link
Contributor

rxin commented Jan 14, 2016

What's different from the one in Spark master now? It would be great to contribute the parser changes back now we have a full fledged parser in Spark, and going towards more ANSI compatibility is definitely on the roadmap.

@scwf
Copy link
Contributor Author

scwf commented Jan 16, 2016

@rxin Our parser is a extended version of the SqlParser, the main difference is that we add the support for subquery(both correlated and uncorrelated ),exists, in and some minor improvement such as grouping, top, cube/rollup. It support the tpcds generated ANSI sql syntax without any change.

I noticed that there are some PRs for these features, i will take a look at that PRs when i have time and see what i can do.

@rxin
Copy link
Contributor

rxin commented Jan 16, 2016

FYI we are going to remove this pluggability. It is extra overhead to maintain, and actually encourages projects to not contribute their improvements upstream, which is bad.

@scwf
Copy link
Contributor Author

scwf commented Jan 16, 2016

Actually we were trying to contribute this improvements, unfortunately the community do not want them for maintain(or compatibility with hive ql) reason in the past:).

I am glad that spark sql use a single parser such that people can make contributions and make it more and more powerful.

@rxin
Copy link
Contributor

rxin commented Jan 18, 2016

Yup thanks. That's why we are only removing it now :)

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.

4 participants