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
[KYUUBI #6305][FOLLOWUP] Improve package Spark SQL engine both Scala 2.12 and 2.13 #6330
Conversation
build/dist
Outdated
else | ||
EXTRA_SPARK_ENGINE_BUILD_COMMAND=("$MVN" install $MVN_DIST_OPT $@ -Pscala-2.12 -pl :kyuubi-spark-sql-engine_2.12 -am) | ||
EXTRA_SPARK_ENGINE_BUILD_COMMAND=("$MVN" install $MVN_DIST_OPT -pl ${FILTERED_ARGS[@]} :kyuubi-spark-sql-engine_2.12 -am) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXTRA_SPARK_ENGINE_BUILD_COMMAND=("$MVN" install $MVN_DIST_OPT -pl ${FILTERED_ARGS[@]} :kyuubi-spark-sql-engine_2.12 -am) | |
EXTRA_SPARK_ENGINE_BUILD_COMMAND=("$MVN" install $MVN_DIST_OPT ${FILTERED_ARGS[@]} -pl :kyuubi-spark-sql-engine_2.12 -am) |
build/dist
Outdated
FILTERED_ARGS=() | ||
# shellcheck disable=SC2045 | ||
for arg in "$@"; do | ||
if [[ $arg != -Pscala* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the approach of dealing with parameters If there's no better way, even if it is hack to compare.
Not only are we dealing with arguments like -Pscala*, but we also need -P p1,scala-2.13, -P p1,scala-2.13,p2... -Dscala.version=2.13 and so on.
In addition, we can add some comments to describe it, and if the scala version changes in the future, it can guide the developer to clarify the meaning of this piece and determine whether it needs to change.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6330 +/- ##
============================================
+ Coverage 58.41% 58.49% +0.07%
Complexity 24 24
============================================
Files 653 653
Lines 39880 39968 +88
Branches 5481 5488 +7
============================================
+ Hits 23296 23378 +82
- Misses 14083 14091 +8
+ Partials 2501 2499 -2 ☔ View full report in Codecov by Sentry. |
@PorterZhang2021 thanks for keeping work on this issue. actually, we can replace all mvn args |
BTW, the code you pasted is weird, like something produced by OCR? |
ok, I will try it again, I'm not quite sure what ocr means. Perhaps there is a part of the content that I searched for Google and inquired about GPT, and then made similar implementations myself, which looks a bit strange. I will make some modifications later. |
cc @pan3793 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified locally.
Thanks, merged to master |
…2.12 and 2.13 # 🔍 Description ## Issue References 🔗 This pull request fixes #6305 ## Describe Your Solution 🔧 ### Solution 1 use `<profile>` - Inappropriate I found a way to use <profiles>, roughly as follows: ```xml <profile> <id>scala-2.12</id> <properties> <scala.binary.version>2.12</scala.binary.version> </properties> </profile> ``` After specifying, I attempted to use 1. `build/mvn install -DskipTests -Dmaven.javadoc.skip=true -Dmaven.scaladoc.skip=true - Dmaven.source.skip -Pscala-2.12 -Pscala-2.13 -pl: kyuubi-spark-sql-engine -am` 2. `build/mvn install -DskipTests -Dmaven.javadoc.skip=true -Dmaven.scaladoc.skip=true - Dmaven.source.skip -Pscala-2.13 -Pscala-2.12 -pl: kyuubi-spark-sql-engine -am` #### Problem But in the end, it was found that if both '-Pscala-2.12' and '-Pscala-2.13' are used at the same time, '-Pscala2.13' will be selected by default, which may not be a good solution to this problem. ### Solution2 Later, I thought about whether it was possible to filter the parameter '$' internally. It is effective. ## 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 🧪 1. scala2.12 ![scala_2 12版本spark-sql-engine](https://github.com/apache/kyuubi/assets/96274454/a9f82433-8f73-4bb0-b0f7-7d2725435a0e) ![scala_2 12_select 测试](https://github.com/apache/kyuubi/assets/96274454/fe1cb601-8d19-4dc0-a248-c045176b87a6) 2. scala2.13 ![image](https://github.com/apache/kyuubi/assets/96274454/d79ae1cc-64fe-4079-b706-37a21b00b627) ![scala_2 13版本测试](https://github.com/apache/kyuubi/assets/96274454/a4084499-12ea-4150-982a-67aacd16c184) --- # 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 #6330 from PorterZhang2021/followup-6297. Closes #6305 5524b13 [Cheng Pan] nit cccb94d [PorterZhang2021] [# 6297] imporve Package Spark SQL engine both Scala 2.12 and 2.13 Follow Up fb03d60 [Porter Zhang] Merge branch 'apache:master' into followup-6297 393435e [PorterZhang2021] [# 6297] imporve Package Spark SQL engine both Scala 2.12 and 2.13 Follow Up 0b49f60 [Porter Zhang] Merge branch 'apache:master' into followup-6297 f7c7a65 [PorterZhang2021] [# 6297] Package Spark SQL engine both Scala 2.12 and 2.13 Follow Up 3d2926a [Porter Zhang] Merge branch 'apache:master' into followup-6297 eb64061 [PorterZhang2021] [followup-issue6297] improve issue6297 956ac49 [PorterZhang2021] [# 6297] Package Spark SQL engine both Scala 2.12 and 2.13 Follow Up Lead-authored-by: PorterZhang2021 <PorterZhang2021@outlook.com> Co-authored-by: Porter Zhang <96274454+PorterZhang2021@users.noreply.github.com> Co-authored-by: Cheng Pan <chengpan@apache.org> Co-authored-by: PorterZhang2021 <porterzhang2021@outlook.com> Co-authored-by: Porter Zhang <porterzhang2021@outlook.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
Cherry-picked to 1.9.1 to support Spark 4.0.0-preview1 |
🔍 Description
Issue References 🔗
This pull request fixes #6305
Describe Your Solution 🔧
Solution 1 use
<profile>
- InappropriateI found a way to use , roughly as follows:
After specifying, I attempted to use
build/mvn install -DskipTests -Dmaven.javadoc.skip=true -Dmaven.scaladoc.skip=true - Dmaven.source.skip -Pscala-2.12 -Pscala-2.13 -pl: kyuubi-spark-sql-engine -am
build/mvn install -DskipTests -Dmaven.javadoc.skip=true -Dmaven.scaladoc.skip=true - Dmaven.source.skip -Pscala-2.13 -Pscala-2.12 -pl: kyuubi-spark-sql-engine -am
Problem
But in the end, it was found that if both '-Pscala-2.12' and '-Pscala-2.13' are used at the same time, '-Pscala2.13' will be selected by default, which may not be a good solution to this problem.
Solution2
Later, I thought about whether it was possible to filter the parameter '$@' internally. It is effective.
Types of changes 🔖
Test Plan 🧪
Checklist 📝
Be nice. Be informative.