Skip to content

[SPARK-2410][SQL] Merging Hive Thrift/JDBC server - #1600

Closed
liancheng wants to merge 19 commits into
apache:masterfrom
liancheng:jdbc
Closed

liancheng wants to merge 19 commits into
apache:masterfrom
liancheng:jdbc

Conversation

@liancheng

Copy link
Copy Markdown
Contributor

(This is a replacement of #1399, trying to fix potential HiveThriftServer2 port collision between parallel builds. Please refer to these comments for details.)

JIRA issue: SPARK-2410

Merging the Hive Thrift/JDBC server from branch-1.0-jdbc.

Thanks @chenghao-intel for his initial contribution of the Spark SQL CLI.

@SparkQA

SparkQA commented Jul 26, 2014

Copy link
Copy Markdown

QA tests have started for PR 1600. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17215/consoleFull

@SparkQA

SparkQA commented Jul 26, 2014

Copy link
Copy Markdown

QA results for PR 1600:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds the following public classes (experimental):
class SparkSQLOperationManager(hiveContext: HiveContext) extends OperationManager with Logging {

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17215/consoleFull

@liancheng

Copy link
Copy Markdown
Contributor Author

@marmbrus The build failure was caused by PySpark, please help re-test this, thanks!

@concretevitamin

Copy link
Copy Markdown
Contributor

Jenkins, retest this please.

@SparkQA

SparkQA commented Jul 26, 2014

Copy link
Copy Markdown

QA tests have started for PR 1600. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17217/consoleFull

@SparkQA

SparkQA commented Jul 26, 2014

Copy link
Copy Markdown

QA results for PR 1600:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds the following public classes (experimental):
class SparkSQLOperationManager(hiveContext: HiveContext) extends OperationManager with Logging {

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17217/consoleFull

@pwendell

Copy link
Copy Markdown
Contributor

Okay - lets try this again. I can merge it!

@asfgit asfgit closed this in f6ff2a6 Jul 27, 2014
@liancheng

Copy link
Copy Markdown
Contributor Author

Thanks @pwendell, just checked all failed Jenkins builds ever since then, fortunately none was caused by this PR (phew...).

@marmbrus

Copy link
Copy Markdown
Contributor

@liancheng

Copy link
Copy Markdown
Contributor Author

Ouch... This is really embarrassing... OK, I'll try to refactor those possibly flaky test code inherited from Shark (e.g. hard coded timeout, etc.).

harishreedharan pushed a commit to harishreedharan/spark that referenced this pull request Jul 29, 2014
… fix)

JIRA issue: [SPARK-2410](https://issues.apache.org/jira/browse/SPARK-2410)

Another try for apache#1399 & apache#1600. Those two PR breaks Jenkins builds because we made a separate profile `hive-thriftserver` in sub-project `assembly`, but the `hive-thriftserver` module is defined outside the `hive-thriftserver` profile. Thus every time a pull request that doesn't touch SQL code will also execute test suites defined in `hive-thriftserver`, but tests fail because related .class files are not included in the assembly jar.

In the most recent commit, module `hive-thriftserver` is moved into its own profile to fix this problem. All previous commits are squashed for clarity.

Author: Cheng Lian <lian.cs.zju@gmail.com>

Closes apache#1620 from liancheng/jdbc-with-maven-fix and squashes the following commits:

629988e [Cheng Lian] Moved hive-thriftserver module definition into its own profile
ec3c7a7 [Cheng Lian] Cherry picked the Hive Thrift server
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
(This is a replacement of apache#1399, trying to fix potential `HiveThriftServer2` port collision between parallel builds. Please refer to [these comments](apache#1399 (comment)) for details.)

JIRA issue: [SPARK-2410](https://issues.apache.org/jira/browse/SPARK-2410)

Merging the Hive Thrift/JDBC server from [branch-1.0-jdbc](https://github.com/apache/spark/tree/branch-1.0-jdbc).

Thanks chenghao-intel for his initial contribution of the Spark SQL CLI.

Author: Cheng Lian <lian.cs.zju@gmail.com>

Closes apache#1600 from liancheng/jdbc and squashes the following commits:

ac4618b [Cheng Lian] Uses random port for HiveThriftServer2 to avoid collision with parallel builds
090beea [Cheng Lian] Revert changes related to SPARK-2678, decided to move them to another PR
21c6cf4 [Cheng Lian] Updated Spark SQL programming guide docs
fe0af31 [Cheng Lian] Reordered spark-submit options in spark-shell[.cmd]
199e3fb [Cheng Lian] Disabled MIMA for hive-thriftserver
1083e9d [Cheng Lian] Fixed failed test suites
7db82a1 [Cheng Lian] Fixed spark-submit application options handling logic
9cc0f06 [Cheng Lian] Starts beeline with spark-submit
cfcf461 [Cheng Lian] Updated documents and build scripts for the newly added hive-thriftserver profile
061880f [Cheng Lian] Addressed all comments by @pwendell
7755062 [Cheng Lian] Adapts test suites to spark-submit settings
40bafef [Cheng Lian] Fixed more license header issues
e214aab [Cheng Lian] Added missing license headers
b8905ba [Cheng Lian] Fixed minor issues in spark-sql and start-thriftserver.sh
f975d22 [Cheng Lian] Updated docs for Hive compatibility and Shark migration guide draft
3ad4e75 [Cheng Lian] Starts spark-sql shell with spark-submit
a5310d1 [Cheng Lian] Make HiveThriftServer2 play well with spark-submit
61f39f4 [Cheng Lian] Starts Hive Thrift server via spark-submit
2c4c539 [Cheng Lian] Cherry picked the Hive Thrift server
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
… fix)

JIRA issue: [SPARK-2410](https://issues.apache.org/jira/browse/SPARK-2410)

Another try for apache#1399 & apache#1600. Those two PR breaks Jenkins builds because we made a separate profile `hive-thriftserver` in sub-project `assembly`, but the `hive-thriftserver` module is defined outside the `hive-thriftserver` profile. Thus every time a pull request that doesn't touch SQL code will also execute test suites defined in `hive-thriftserver`, but tests fail because related .class files are not included in the assembly jar.

In the most recent commit, module `hive-thriftserver` is moved into its own profile to fix this problem. All previous commits are squashed for clarity.

Author: Cheng Lian <lian.cs.zju@gmail.com>

Closes apache#1620 from liancheng/jdbc-with-maven-fix and squashes the following commits:

629988e [Cheng Lian] Moved hive-thriftserver module definition into its own profile
ec3c7a7 [Cheng Lian] Cherry picked the Hive Thrift server
@liancheng
liancheng deleted the jdbc branch September 24, 2014 00:09
sunchao pushed a commit to sunchao/spark that referenced this pull request Jun 2, 2023
### What changes were proposed in this pull request?

This PR cherry-picks Iceberg fixes to our row-level implementation.
apache/iceberg@3bc2f97
apache/iceberg@d5411d2

### Why are the changes needed?

These changes are needed to respect attribute nullability in MERGE.

### Does this PR introduce _any_ user-facing change?

No.


### How was this patch tested?

Iceberg tests.
sunchao pushed a commit to sunchao/spark that referenced this pull request Jun 2, 2023
MaxGekk added a commit to MaxGekk/spark that referenced this pull request Nov 21, 2026
)

<!-- title: [VARKA-630] Lift a shared condition once, not once per path -->
### What changes were proposed in this pull request?

The compiler lifts a condition onto another lane in three places, `VarkaConditionCompiler.onIntLane`, `onLongLane` and `VarkaIntegralCastCompiler.onLane`. Each rebuilt the condition by recursion with no memo, so a condition reached by several paths was rebuilt once per path, into distinct equal objects. On a chain where each level is `level AND NOT level` the lift took 2.5 s (`onIntLane`) and 3.2 s (`onLongLane`) at depth 24, four times more for every two levels (`results/VARKA-630-lane-lifts.txt`, single readings from a scratch test whose source is kept beside it).

- Each lift now keeps an identity memo of the conditions it has lifted, so a shared condition is lifted once and the copies share the result. At depths 24 to 64 a lift takes 0.2 to 0.4 ms.
- `onIntLaneAll` threads one memo through a conjunct list, so a condition two conjuncts share is also lifted once.
- A new `VarkaConditionLiftSuite` lifts a 64-deep shared chain through each lift within ten seconds and asserts the copies are one object, builds one through `CondIf`, checks a list of conjuncts shares its lift, and checks a shallow chain lifts to the same record as before.
- `VARKA-559.md` 2.3 gets a dated correction, and row 630 moves the lifts' memo from owed to done. The chrono `rearm`, which lifts a value chain, was neither measured nor changed.

Not in this pull request: the parser and the replay of the DAG form, the per-path walks of `VARKA-559.md` 2.3 at depth 64 other than these, and whether Catalyst boolean expressions ever compile to a shared condition (not shown here).

### Why are the changes needed?

The int lane's chain cap cannot be raised to 64 (row 629) while planning costs the paths of a shared structure. apache#1591 made the shape hash's text linear and apache#1596 the shape key's equality; this removes the third per-path cost on the way, the lifts.

### Does this PR introduce _any_ user-facing change?

No. A lifted condition is the same value as before, only built once; `VarkaConditionLiftSuite` checks a shallow chain against the old result, and the existing emitter suites pass.

### How was this patch tested?

`VarkaConditionLiftSuite` (five tests) and the mixed-lane, narrow, floating-cast, expression-compiler and cast-matrix suites pass, 259 tests with 2 canceled that I did not look into. Error Prone and NullAway are clean locally. Size is 228 counted lines.

Not measured: a condition that is not a chain, and the cost of the memo on an ordinary small condition, where the old recursion was already linear.

**/code-review high (21 November 2026): 5 findings, fixed: 4, kept: 1.** Fixed: row 630 still listed the memo as owed; the suite exercised only the `And`/`Not` arms (a `CondIf` chain and the list case are added; the other arms are not each tested); `onIntLaneAll` gave every conjunct its own memo; the before column of the results file could not be reproduced (the file now says so). Kept: `acrossKinds` evaluates `onLongLane(on).orElse(onIntLane(on))` eagerly, so it lifts twice when the first succeeds; that was already there, is linear now, and changing the call is not this pull request's job.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
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.

5 participants