Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spark-sql-engine's classes should not be visible in server module #6708

Closed
wants to merge 3 commits into from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Sep 22, 2024

🔍 Description

Issue References 🔗

The server module does not consume the spark-sql-engine classes, but it supposes that
spark-sql-engine's jar existed on the target folder, so here we declare it as a dependency
to make sure that Maven always processes spark-sql-engine module before the server module.
IntelliJ IDEA 2024.1 fixed the IDEA-93855, thus the relocated classes inside the
spark-sql-engine's shaded jar are visible in the server module in IDEA, for example,
org.apache.kyuubi.shaded.spark.connect.proto.ExecutePlanRequest, which silently breaks
the IDEA code analysis and jumping capabilities.

Describe Your Solution 🔧

Changing the dependency type from jar(default value) to pom seems to be a workaround.

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

image

Behavior Without This Pull Request ⚰️

image

Behavior With This Pull Request 🎉

image

Checklist 📝

Be nice. Be informative.

@pan3793 pan3793 changed the title IDEA-93855 spark-sql-engine's classes should not be visible in server module Sep 22, 2024
@pan3793 pan3793 requested a review from cxzl25 September 22, 2024 04:46
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (8056235) to head (a73fd42).
Report is 2 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #6708   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         684     684           
  Lines       42279   42279           
  Branches     5765    5765           
======================================
  Misses      42279   42279           
Flag Coverage Δ
0.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pan3793 pan3793 self-assigned this Sep 23, 2024
@pan3793 pan3793 closed this in 1d35cf2 Sep 23, 2024
pan3793 added a commit that referenced this pull request Sep 23, 2024
…rver module

# 🔍 Description
## Issue References 🔗

The server module does not consume the `spark-sql-engine` classes, but it supposes that
`spark-sql-engine`'s jar existed on the target folder, so here we declare it as a dependency
to make sure that Maven always processes `spark-sql-engine` module before the server module.
IntelliJ IDEA 2024.1 fixed the IDEA-93855, thus the relocated classes inside the
`spark-sql-engine`'s shaded jar are visible in the server module in IDEA, for example,
`org.apache.kyuubi.shaded.spark.connect.proto.ExecutePlanRequest`, which silently breaks
the IDEA code analysis and jumping capabilities.

## Describe Your Solution 🔧

Changing the dependency type from `jar`(default value) to `pom` seems to be a workaround.

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

<img width="593" alt="image" src="https://github.com/user-attachments/assets/cc53709a-5f9d-4452-a24f-0c84e2342191">

#### Behavior Without This Pull Request ⚰️

<img width="1511" alt="image" src="https://github.com/user-attachments/assets/1c547c6d-a603-4c9d-92b4-8e2059b35fac">

#### Behavior With This Pull Request 🎉

<img width="1509" alt="image" src="https://github.com/user-attachments/assets/55f9e6e5-b9ea-4959-9142-ab7db21ab9b1">

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6708 from pan3793/IDEA-93855.

Closes #6708

a73fd42 [Cheng Pan] fix
e4a8d36 [Cheng Pan] nit
8c58d2d [Cheng Pan] IDEA-93855

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 1d35cf2)
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 added a commit that referenced this pull request Sep 23, 2024
…rver module

# 🔍 Description
## Issue References 🔗

The server module does not consume the `spark-sql-engine` classes, but it supposes that
`spark-sql-engine`'s jar existed on the target folder, so here we declare it as a dependency
to make sure that Maven always processes `spark-sql-engine` module before the server module.
IntelliJ IDEA 2024.1 fixed the IDEA-93855, thus the relocated classes inside the
`spark-sql-engine`'s shaded jar are visible in the server module in IDEA, for example,
`org.apache.kyuubi.shaded.spark.connect.proto.ExecutePlanRequest`, which silently breaks
the IDEA code analysis and jumping capabilities.

## Describe Your Solution 🔧

Changing the dependency type from `jar`(default value) to `pom` seems to be a workaround.

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

<img width="593" alt="image" src="https://github.com/user-attachments/assets/cc53709a-5f9d-4452-a24f-0c84e2342191">

#### Behavior Without This Pull Request ⚰️

<img width="1511" alt="image" src="https://github.com/user-attachments/assets/1c547c6d-a603-4c9d-92b4-8e2059b35fac">

#### Behavior With This Pull Request 🎉

<img width="1509" alt="image" src="https://github.com/user-attachments/assets/55f9e6e5-b9ea-4959-9142-ab7db21ab9b1">

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6708 from pan3793/IDEA-93855.

Closes #6708

a73fd42 [Cheng Pan] fix
e4a8d36 [Cheng Pan] nit
8c58d2d [Cheng Pan] IDEA-93855

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 1d35cf2)
Signed-off-by: Cheng Pan <chengpan@apache.org>
@pan3793
Copy link
Member Author

pan3793 commented Sep 23, 2024

Thanks, merged to master/1.9.3/1.8.3

@pan3793 pan3793 added this to the v1.8.3 milestone Sep 23, 2024
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.

3 participants