Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Sep 25, 2023

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
Member Author

cc @dongjoon-hyun

@HyukjinKwon
Copy link
Member Author

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

@HyukjinKwon HyukjinKwon changed the title [SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9 [SPARK-45309][SQL] Remove all SystemUtils.isJavaVersionAtLeast with JDK 9/11 Sep 25, 2023
Copy link
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
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
Member Author

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
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
Member Author

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
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
Copy link
Contributor

LuciferYang commented Sep 25, 2023

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
Member Author

Let me clean them up together here. Thanks!

@HyukjinKwon HyukjinKwon 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/17 Sep 25, 2023
@HyukjinKwon
Copy link
Member Author

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
Member Author

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

@github-actions github-actions bot added the DOCS label Sep 25, 2023
@HyukjinKwon HyukjinKwon force-pushed the SPARK-45309 branch 2 times, most recently from 7e09f07 to f9296bb Compare September 25, 2023 13:16
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

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.

@github-actions github-actions bot removed the DOCS label Sep 26, 2023
@HyukjinKwon HyukjinKwon marked this pull request as ready for review September 26, 2023 03:23
@HyukjinKwon
Copy link
Member Author

Merged to master.

@HyukjinKwon
Copy link
Member Author

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 free to 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