Skip to content

Conversation

@hvanhovell
Copy link
Contributor

This PR inlines the Hive SQL parser in Spark SQL.

The previous (merged) incarnation of this PR passed all tests, but had and still has problems with the build. These problems are caused by a the fact that - for some reason - in some cases the ANTLR generated code is not included in the compilation fase.

This PR is a WIP and should not be merged until we have sorted out the build issues.

nongli and others added 9 commits December 21, 2015 14:13
This is a WIP. This inlines the hive sql grammar parser into spark sql in the hive
subproject. This should eventually be moved into the SQL core project once all the
hive dependencies are removed.

This patch does some of that by cleaning up the hive code to remove much of semantic
analysis.
@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48476 has finished for PR 10525 at commit b8e76b2.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48478 has finished for PR 10525 at commit b8e76b2.

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

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48481 has finished for PR 10525 at commit b8e76b2.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48483 has finished for PR 10525 at commit b8e76b2.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48485 has finished for PR 10525 at commit b8e76b2.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@hvanhovell
Copy link
Contributor Author

last one promise :)

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48486 has finished for PR 10525 at commit b8e76b2.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48501 has finished for PR 10525 at commit a7749a8.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48509 has finished for PR 10525 at commit 90c11e8.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48518 has finished for PR 10525 at commit 84db0f4.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48550 has finished for PR 10525 at commit e3e2f72.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48552 has finished for PR 10525 at commit e3e2f72.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48553 has finished for PR 10525 at commit e3e2f72.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

retest this please

@hvanhovell
Copy link
Contributor Author

@JoshRosen these builds fail often and non-deterministically with a fails build dependency tests. The problem is that I cannot find the cause of this problem (the build fails with no helpfull message), these builds share this problem:

After the initial error I thought I messed up the dependencies (I am messing with the build). I changed them and I got a correct build failure with 'nice' error message:

Could you take a look?

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48555 has finished for PR 10525 at commit e3e2f72.

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

@hvanhovell
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48557 has finished for PR 10525 at commit e3e2f72.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@JoshRosen
Copy link
Contributor

I have a few hunches about what could be causing the dependency manifest checking problems. I'll keep investigating when I get home later tonight. I think I've spotted two potential problems: there might be some portability issues with how we're using sort and I think there might be a mistake in the exit-code-handling logic.

@rxin
Copy link
Contributor

rxin commented Dec 31, 2015

Should we revert that dependency check thing first?

@JoshRosen
Copy link
Contributor

Aha! It appears that there is a portability issue in sort, or at least in how we're using it in the dependency-checking script.

When I run echo -e "breeze-macros\nbreeze_2.0" | sort on my Mac, I get

breeze-macros
breeze_2.0

but I get the opposite ordering when running on AMPLab Jenknis.

On my mac, sort --version outputs sort (GNU coreutils) 5.93, whereas AMP Jenkins has sort (GNU coreutils) 8.4. But it turns out that this isn't the problem! It's a locale-dependent issue: https://stackoverflow.com/questions/28881/why-doesnt-sort-sort-the-same-on-every-machine

We need to set LC_ALL=C in order to make things portable. I'm going to open a hotfix PR to address these issues, then will retest this PR once my fix is in.

@JoshRosen
Copy link
Contributor

Patch to fix it is at #10543; planning to merge soon.

@JoshRosen
Copy link
Contributor

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Jan 1, 2016

Test build #48563 has finished for PR 10525 at commit e3e2f72.

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

@rxin
Copy link
Contributor

rxin commented Jan 1, 2016

I triggered 3 more runs.

@SparkQA
Copy link

SparkQA commented Jan 1, 2016

Test build #2285 has finished for PR 10525 at commit e3e2f72.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Jan 1, 2016

cc @JoshRosen dependency failed again

@SparkQA
Copy link

SparkQA commented Jan 1, 2016

Test build #2284 has finished for PR 10525 at commit e3e2f72.

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

@SparkQA
Copy link

SparkQA commented Jan 1, 2016

Test build #2286 has finished for PR 10525 at commit e3e2f72.

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

@SparkQA
Copy link

SparkQA commented Jan 1, 2016

Test build #2289 has finished for PR 10525 at commit e3e2f72.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Jan 1, 2016

@JoshRosen I pushed a commit directly to disable test-dependencies.

@SparkQA
Copy link

SparkQA commented Jan 1, 2016

Test build #2290 has finished for PR 10525 at commit e3e2f72.

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

@rxin
Copy link
Contributor

rxin commented Jan 2, 2016

OK merging again.

@asfgit asfgit closed this in 970635a Jan 2, 2016
@gatorsmile
Copy link
Member

After this merge, I am unable to make a build in IntelliJ IDEA. I hit the following the errors:

Error:(1477, 5) not found: value SparkSqlParser
    SparkSqlParser.Number,
    ^
Error:(1478, 5) not found: value SparkSqlParser
    SparkSqlParser.TinyintLiteral,
    ^
Error:(1479, 5) not found: value SparkSqlParser
    SparkSqlParser.SmallintLiteral,
    ^
Error:(1480, 5) not found: value SparkSqlParser
    SparkSqlParser.BigintLiteral,
    ^
Error:(1481, 5) not found: value SparkSqlParser
    SparkSqlParser.DecimalLiteral)
    ^
Error:(1686, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.StringLiteral =>
                                        ^
Error:(1689, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_DATELITERAL =>
                                        ^
Error:(1692, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_CHARSETLITERAL =>
                                        ^
Error:(1695, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_YEAR_MONTH_LITERAL =>
                                        ^
Error:(1698, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_DAY_TIME_LITERAL =>
                                        ^
Error:(1701, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_YEAR_LITERAL =>
                                        ^
Error:(1704, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_MONTH_LITERAL =>
                                        ^
Error:(1707, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_DAY_LITERAL =>
                                        ^
Error:(1710, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_HOUR_LITERAL =>
                                        ^
Error:(1713, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_MINUTE_LITERAL =>
                                        ^
Error:(1716, 41) not found: value SparkSqlParser
    case ast: ASTNode if ast.getType == SparkSqlParser.TOK_INTERVAL_SECOND_LITERAL =>
                                        ^

@gatorsmile
Copy link
Member

nvm, I just need to reimport all maven projects. The problem has been fixed. Thanks!

@hvanhovell
Copy link
Contributor Author

Good one, was looking for that myself :)...

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