-
Notifications
You must be signed in to change notification settings - Fork 331
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
Conversation
1f19672
to
69b6a46
Compare
b71ee4f
to
7771821
Compare
897a84d
to
193033f
Compare
@@ -245,29 +240,4 @@ void testTransformUpdateColumnNullability() { | |||
Assertions.assertEquals( | |||
sparkUpdateColumnNullability.nullable(), gravitinoUpdateColumnNullability.nullable()); | |||
} | |||
|
|||
@Test | |||
void testUpdateColumnDefaultValue() { |
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.
move the test to spark3.4 module
...com/datastrato/gravitino/spark/connector/integration/test/iceberg/SparkIcebergCatalogIT.java
Outdated
Show resolved
Hide resolved
@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)", |
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.
@caican00 , spark 3.3 will throw something like syntax error here
f39ba94
to
a2c9266
Compare
gradle/libs.versions.toml
Outdated
trino = '426' | ||
spark = "3.4.1" # 3.5.0 causes tests to fail | ||
spark = "3.4.1" # used for Gravitino catalog integration test |
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.
Why do we need this, can we reuse spark34
? Also, I suggest to rename to spark-34
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.
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
settings.gradle.kts
Outdated
@@ -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") |
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 think we can rename to spark-3.3
, spark-3.4
, like this.
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.
How do you support different scala version?
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.
scala version is specified by -PscalaVersion when build or test. like
./gradlew :spark-connector:spark35-runtime:build -PscalaVersion=2.13
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.
multi scala version support will be in another PR
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.
done
when (sparkMajorVersion) { | ||
"3.3" -> { | ||
val kyuubiVersion: String = libs.versions.kyuubi4spark33.get() | ||
println("Applying Spark 3.3 dependencies") |
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.
We can remove this line, this is useless.
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.
ok
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.
done
when (sparkMajorVersion) { | ||
"3.4" -> { | ||
val kyuubiVersion: String = libs.versions.kyuubi4spark34.get() | ||
println("Applying Spark 3.4 dependencies") |
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.
Also here.
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.
done
@jerryshao all comments are addressed, please help to review again. |
### 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
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
…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
…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
What changes were proposed in this pull request?
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