Skip to content

[SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9/11/17 - #43098

Closed
HyukjinKwon wants to merge 3 commits into
apache:masterfrom
HyukjinKwon:SPARK-45309
Closed

[SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9/11/17#43098
HyukjinKwon wants to merge 3 commits into
apache:masterfrom
HyukjinKwon:SPARK-45309

Conversation

@HyukjinKwon

@HyukjinKwonHyukjinKwon commented Sep 25, 2023

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR removes all SystemUtils.isJavaVersionAtLeast with JDK 9/11/17.

Why are the changes needed?

  • To remove unused code.
  • We dropped JDK 8 and 11 at SPARK-44112 so no need to check lower versions conditionally.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI in this PR should test them out.

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

No.

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

cc @dongjoon-hyun

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

@LuciferYang and @cloud-fan . They are mostly Hive and SQL direct buffer stuff.

Comment threadcore/src/main/scala/org/apache/spark/internal/config/UI.scala Outdated
@HyukjinKwonHyukjinKwon changed the title [SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9[SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9/11Sep 25, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

still need this val disableRewrite?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will there be a chance for these ignored cases to be restarted?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Let's leave it for now. I think this test does not target to test 0.12 (although the metastore version is set like that).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shall we change the hive version in these tests?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

For this and and the last one, we could. But the others don't set the Hive version apparently. I will just take a look separately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For this function, it should be possible to further refactor to avoid using un-exported APIs and internal APIs, but the current changes in this pr are ok.

@LuciferYang

LuciferYang commented Sep 25, 2023

Copy link
Copy Markdown
Contributor

For the following case, it should also be possible to perform cleanup:

if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8)) {

if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_13)) {

Additionally, the SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17) in the following case should also be able to be cleaned up:

if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17) &&

if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17) &&SystemUtils.IS_OS_LINUX) {

Of course, they can also belong to a separate pr

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

Let me clean them up together here. Thanks!

@HyukjinKwonHyukjinKwon changed the title [SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9/11[SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9/11/17Sep 25, 2023
@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

For first and second, they are being fixed in a different PR (as it directly relates to one specific past fix, and I would like the author to review).

@HyukjinKwon
HyukjinKwon marked this pull request as draft September 25, 2023 10:08
@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

Let me turn this to draft for now. I think some tests might fail.

@HyukjinKwon
HyukjinKwonforce-pushed the SPARK-45309 branch 2 times, most recently from 7e09f07 to f9296bbCompareSeptember 25, 2023 13:16
Comment threaddocs/sql-data-sources-hive-tables.md Outdated
Comment threaddocs/sql-migration-guide.md Outdated

@dongjoon-hyundongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly this PR is right, but we had better drop old HMS independently first.

@HyukjinKwon
HyukjinKwon marked this pull request as ready for review September 26, 2023 03:23
@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

Merged to master.

@HyukjinKwon

Copy link
Copy Markdown
MemberAuthor

Oops, I realised that there wasn't an approval here. I can revert or address the comments if there are some. Apologies.

yaooqinn pushed a commit that referenced this pull request Dec 21, 2023
…eTable`
### What changes were proposed in this pull request?
This pr aims to cleans up the unused local variables `partitionPath`, `hiveVersion`, and `doHiveOverwrite` in `InsertIntoHiveTable`. The code that used these variables has already been cleaned up in SPARK-45309 | #43098.
### Why are the changes needed?
Code cleanup.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Pass GitHub Actions
### Was this patch authored or co-authored using generative AI tooling?
No
Closes#44433 from LuciferYang/insert-into-hive-table.
Lead-authored-by: yangjie01 <yangjie01@baidu.com>
Co-authored-by: YangJie <yangjie01@baidu.com>
Signed-off-by: Kent Yao <yao@apache.org>
@HyukjinKwon
HyukjinKwon deleted the SPARK-45309 branch January 15, 2024 00:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@HyukjinKwon@LuciferYang@cloud-fan@dongjoon-hyun@pan3793