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

[#3554] feat(spark-connector): support spark multi Version #3415

Merged
merged 6 commits into from
May 28, 2024

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented May 16, 2024

What changes were proposed in this pull request?

  1. split spark connector to spark common which contains common logic and v3.x which contains adaptor logic
  2. add separate GitHub action to do spark IT
  3. ./gradlew :spark-connector:spark35-runtime:build to build corresponding spark connector jars

Why are the changes needed?

Fix: #3554

Does this PR introduce any user-facing change?

no

How was this patch tested?

existing tests with corresponding spark version

@FANNG1 FANNG1 marked this pull request as draft May 16, 2024 08:06
@FANNG1 FANNG1 changed the title support spark multi Version [SIP] support spark multi Version May 16, 2024
@FANNG1 FANNG1 force-pushed the version branch 2 times, most recently from 1f19672 to 69b6a46 Compare May 16, 2024 15:27
@FANNG1 FANNG1 self-assigned this May 16, 2024
@FANNG1 FANNG1 force-pushed the version branch 4 times, most recently from b71ee4f to 7771821 Compare May 23, 2024 00:17
@FANNG1 FANNG1 force-pushed the version branch 3 times, most recently from 897a84d to 193033f Compare May 24, 2024 07:26
@@ -245,29 +240,4 @@ void testTransformUpdateColumnNullability() {
Assertions.assertEquals(
sparkUpdateColumnNullability.nullable(), gravitinoUpdateColumnNullability.nullable());
}

@Test
void testUpdateColumnDefaultValue() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

move the test to spark3.4 module

@FANNG1 FANNG1 changed the title [SIP] support spark multi Version [#3554] feat(spark-connector): support spark multi Version May 24, 2024
@FANNG1 FANNG1 marked this pull request as ready for review May 24, 2024 10:51
@FANNG1
Copy link
Contributor Author

FANNG1 commented May 24, 2024

@jerryshao @qqqttt123 @caican00 could you help to review when you are free, thanks

@@ -330,7 +330,7 @@ void testIcebergReservedProperties() throws NoSuchTableException {
dropTableIfExists(tableName);
sql(
String.format(
"CREATE TABLE %s (id INT COMMENT 'id comment' NOT NULL, name STRING COMMENT '', age INT)",
"CREATE TABLE %s (id INT NOT NULL COMMENT 'id comment', name STRING COMMENT '', age INT)",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@caican00 , spark 3.3 will throw something like syntax error here

@FANNG1 FANNG1 force-pushed the version branch 3 times, most recently from f39ba94 to a2c9266 Compare May 28, 2024 03:03
trino = '426'
spark = "3.4.1" # 3.5.0 causes tests to fail
spark = "3.4.1" # used for Gravitino catalog integration test
Copy link
Contributor

@jerryshao jerryshao May 28, 2024

Choose a reason for hiding this comment

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

Why do we need this, can we reuse spark34? Also, I suggest to rename to spark-34

Copy link
Contributor Author

@FANNG1 FANNG1 May 28, 2024

Choose a reason for hiding this comment

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

spark-34 seems not work because libs.versions.spark.34.get() is couldn't compile

Script compilation errors:

  Line 14: val sparkVersion: String = libs.versions.spark.34.get()
                                                         ^ Property getter or setter expected

@@ -28,7 +28,13 @@ include(
"clients:client-python"
)
include("trino-connector")
include("spark-connector:spark-connector", "spark-connector:spark-connector-runtime")
include("spark-connector:spark-common", "spark-connector:spark33", "spark-connector:spark33-runtime", "spark-connector:spark34", "spark-connector:spark34-runtime", "spark-connector:spark35", "spark-connector:spark35-runtime")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can rename to spark-3.3, spark-3.4, like this.

Copy link
Contributor

Choose a reason for hiding this comment

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

How do you support different scala version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

scala version is specified by -PscalaVersion when build or test. like

./gradlew :spark-connector:spark35-runtime:build -PscalaVersion=2.13

Copy link
Contributor Author

Choose a reason for hiding this comment

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

multi scala version support will be in another PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

when (sparkMajorVersion) {
"3.3" -> {
val kyuubiVersion: String = libs.versions.kyuubi4spark33.get()
println("Applying Spark 3.3 dependencies")
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this line, this is useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

when (sparkMajorVersion) {
"3.4" -> {
val kyuubiVersion: String = libs.versions.kyuubi4spark34.get()
println("Applying Spark 3.4 dependencies")
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@FANNG1
Copy link
Contributor Author

FANNG1 commented May 28, 2024

@jerryshao all comments are addressed, please help to review again.

@jerryshao jerryshao merged commit 4c61a64 into apache:main May 28, 2024
33 checks passed
github-actions bot pushed a commit that referenced this pull request May 28, 2024
### What changes were proposed in this pull request?
1. split spark connector to spark common which contains common logic and
v3.x which contains adaptor logic
2. add separate GitHub action to do spark IT
3. ./gradlew :spark-connector:spark35-runtime:build to build
corresponding spark connector jars

### Why are the changes needed?

Fix: #3554 

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

### How was this patch tested?
existing tests with corresponding spark version
FANNG1 added a commit that referenced this pull request May 28, 2024
1. split spark connector to spark common which contains common logic and
v3.x which contains adaptor logic
2. add separate GitHub action to do spark IT
3. ./gradlew :spark-connector:spark35-runtime:build to build
corresponding spark connector jars

Fix: #3554

no

existing tests with corresponding spark version
jerryshao pushed a commit that referenced this pull request May 29, 2024
…3610)

### What changes were proposed in this pull request?
1. split spark connector to spark common which contains common logic and
v3.x which contains adaptor logic
2. add separate GitHub action to do spark IT
3. ./gradlew :spark-connector:spark35-runtime:build to build
corresponding spark connector jars

### Why are the changes needed?
Fix: #3554


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

### How was this patch tested?
existing tests with corresponding spark version
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Jun 13, 2024
…che#3415)

### What changes were proposed in this pull request?
1. split spark connector to spark common which contains common logic and
v3.x which contains adaptor logic
2. add separate GitHub action to do spark IT
3. ./gradlew :spark-connector:spark35-runtime:build to build
corresponding spark connector jars

### Why are the changes needed?

Fix: apache#3554 

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

### How was this patch tested?
existing tests with corresponding spark version
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.

[Subtask] support multi spark version
3 participants