You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "caican00 (via GitHub)" <gi...@apache.org> on 2024/08/06 12:21:00 UTC

[PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

caican00 opened a new pull request, #4403:
URL: https://github.com/apache/gravitino/pull/4403

   ### What changes were proposed in this pull request?
   Fixed spark connector build failed with scala2.13.
   
   ### Why are the changes needed?
   
   Fix:  https://github.com/apache/gravitino/issues/4386
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   build locally with scala2.12 and scala2.13
   
   `./gradlew clean :spark-connector:spark-runtime-3.4:build -PscalaVersion=2.13 -PjdkVersion=17 -x test
   `
   `./gradlew clean :spark-connector:spark-runtime-3.4:build -PscalaVersion=2.12 -PjdkVersion=17 -x test
   `
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708487342


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting

Review Comment:
   @VisibleForTesting ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2272552484

   > Could you run pass the IT? seems there are still some problems in runtime.
   
   got it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2277517498

   > > @FANNG1 could you help review again?
   > 
   > just one comment
   
   updated cc @FANNG1 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713145202


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   ok, let's use a job test spark connector with scala 2.13, please note that seems no need to test scala 2.12 again



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711160411


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13
+        run: |
+          ./gradlew -PscalaVersion=2.13 :spark-connector:spark-3.4:test

Review Comment:
   the `skipDockerTests` param is true by default.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710842837


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting
+  public static List<String> toJavaList(Seq<String> seq) {

Review Comment:
   fixed.



##########
.github/workflows/spark-integration-test.yml:
##########
@@ -92,9 +92,13 @@ jobs:
         run: |
           if [ "${{ matrix.scala-version }}" == "2.12" ];then 
             ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.3:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.4:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.5:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+          fi
+          if [ "${{ matrix.scala-version }}" == "2.13" ];then 
+            ./gradlew -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.4:test

Review Comment:
   updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711168888


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   why not add it in a new stage



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713148379


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   > please note that seems no need to test scala 2.12 again
    yeah, there is no scala2.12.



##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   > please note that seems no need to test scala 2.12 again
   
    yeah, there is no scala2.12.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1706749564


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -58,7 +58,7 @@ jobs:
       matrix:
         architecture: [linux/amd64]
         java-version: [ 8, 11, 17 ]
-        scala-version: [ 2.12 ]
+        scala-version: [ 2.12, 2.13 ]

Review Comment:
   @FANNG1 should we add the scala2.13 jobs to the pipeline?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711117181


##########
.github/workflows/build.yml:
##########
@@ -107,3 +107,41 @@ jobs:
             build/reports
             catalogs/**/*.log
             catalogs/**/*.tar
+
+  spark-connector-build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        scala-version: [ 2.12, 2.13 ]
+    timeout-minutes: 30
+    needs: changes
+    if: needs.changes.outputs.source_changes == 'true'
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-java@v4
+        with:
+          java-version: 8
+          distribution: 'temurin'
+          cache: 'gradle'
+
+      - name: Free up disk space
+        run: |
+          dev/ci/util_free_space.sh
+
+      - name: Build with Gradle

Review Comment:
   updated, only support scala2.13



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2272467561

   Could you run pass the IT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1707001099


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -58,7 +58,7 @@ jobs:
       matrix:
         architecture: [linux/amd64]
         java-version: [ 8, 11, 17 ]
-        scala-version: [ 2.12 ]
+        scala-version: [ 2.12, 2.13 ]

Review Comment:
   There are too many pipelines for now, let's check the test result of the ci



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710825927


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/iceberg/extensions/IcebergExtendedDataSourceV2Strategy.java:
##########
@@ -81,7 +84,7 @@ public Seq<SparkPlan> apply(LogicalPlan plan) {
     } else if (plan instanceof CreateOrReplaceBranch) {
       CreateOrReplaceBranch createOrReplaceBranch = (CreateOrReplaceBranch) plan;
       return IcebergCatalogAndIdentifier.buildCatalogAndIdentifier(
-              spark, createOrReplaceBranch.table())
+              spark, createOrReplaceBranch.table().toIndexedSeq())

Review Comment:
   ```
   error: apply(LogicalPlan) in IcebergExtendedDataSourceV2Strategy cannot override apply(LogicalPlan) in GenericStrategy
     public Seq<SparkPlan> apply(LogicalPlan plan) {
                           ^
     return type scala.collection.Seq<SparkPlan> is not compatible with scala.collection.immutable.Seq<SparkPlan>
   
   ```
   **scala2.12:**
   `type Seq[+A] = _root_.scala.collection.Seq[A]`
   
   The `type scala.Seq` in scala2.12 represents the  `scala.collection.Seq`, `toIndexedSeq` can change the return type to `scala.collection.immutable.Seq`. and `scala.collection.immutable.Seq` is a sub `trait` of `scala.collection.Seq` in scala2.12.
   
   **scala2.13:**
   
   ```
     @migration("scala.Seq is now scala.collection.immutable.Seq instead of scala.collection.Seq", "2.13.0")
     type Seq[+A] = scala.collection.immutable.Seq[A]
     val Seq = scala.collection.immutable.Seq
   ```
   
   The `type scala.Seq` in scala2.13 represents the  `scala.collection.immutable.Seq`, `toIndexedSeq` can change the `scala.collection.Seq` type to `scala.collection.immutable.Seq`.
   
   
   and the return type of the apply function is `type scala.Seq`, to compatible with scala2.13, we have to return to `scala.collection.immutable.Seq` explicitly
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2283206856

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708493490


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -92,9 +92,13 @@ jobs:
         run: |
           if [ "${{ matrix.scala-version }}" == "2.12" ];then 
             ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.3:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.4:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.5:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+          fi
+          if [ "${{ matrix.scala-version }}" == "2.13" ];then 
+            ./gradlew -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.4:test

Review Comment:
   ok for me.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711145748


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   There may be one problem in current pipeline, if `Build with Gradle` failed but `Build spark` successful, no log is updated. maybe we could move `Build spark connector` to the last step since spark connector UT logs is not valuable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2272512281

   > ### What changes were proposed in this pull request?
   > Fixed spark connector build failed with scala2.13.
   > 
   > ### Why are the changes needed?
   > Fix: #4386
   > 
   > ### Does this PR introduce _any_ user-facing change?
   > No.
   > 
   > ### How was this patch tested?
   > build with scala2.12 and scala2.13 locally.
   > 
   > `./gradlew clean :spark-connector:spark-runtime-3.3:build -PscalaVersion=2.12 -PjdkVersion=17 -x test`
   > 
   > ```
   > 
   > ./gradlew clean :spark-connector:spark-runtime-3.4:build -PscalaVersion=2.12 -PjdkVersion=17 -x test
   > 
   > ./gradlew clean :spark-connector:spark-runtime-3.4:build -PscalaVersion=2.13 -PjdkVersion=17 -x test
   > ```
   > 
   > ```
   > ./gradlew clean :spark-connector:spark-runtime-3.5:build -PscalaVersion=2.12 -PjdkVersion=17 -x test
   > 
   > ./gradlew clean :spark-connector:spark-runtime-3.5:build -PscalaVersion=2.13 -PjdkVersion=17 -x test
   > ```
   
   got it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713216740


##########
.github/workflows/build.yml:
##########
@@ -68,6 +68,39 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -x test -PjdkVersion=8
 
+  # To check the spark-connector is compatible with scala2.13
+  spark-connector-build:
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    needs: changes
+    if: needs.changes.outputs.source_changes == 'true'
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-java@v4
+        with:
+          java-version: 8
+          distribution: 'temurin'
+          cache: 'gradle'
+
+      - name: Free up disk space
+        run: |
+          dev/ci/util_free_space.sh
+
+      - name: Build with Scala2.13
+        run: |
+          ./gradlew -PscalaVersion=2.13 -PskipITs -PskipDockerTests=false :spark-connector:spark-3.4:test

Review Comment:
   please use 
   ```
             ./gradlew  :spark-connector:spark-3.4:build -PscalaVersion=2.13 -PskipITs -PskipDockerTests=false
             ./gradlew  :spark-connector:spark-3.5:build -PscalaVersion=2.13 -PskipITs -PskipDockerTests=false 
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713225966


##########
.github/workflows/build.yml:
##########
@@ -68,6 +68,39 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -x test -PjdkVersion=8
 
+  # To check the spark-connector is compatible with scala2.13
+  spark-connector-build:
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    needs: changes
+    if: needs.changes.outputs.source_changes == 'true'
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-java@v4
+        with:
+          java-version: 8
+          distribution: 'temurin'
+          cache: 'gradle'
+
+      - name: Free up disk space
+        run: |
+          dev/ci/util_free_space.sh
+
+      - name: Build with Scala2.13
+        run: |
+          ./gradlew -PscalaVersion=2.13 -PskipITs -PskipDockerTests=false :spark-connector:spark-3.4:test

Review Comment:
   updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710843251


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting

Review Comment:
   removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 merged PR #4403:
URL: https://github.com/apache/gravitino/pull/4403


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2283067921

   > Is everything done, can we move fast to make this merged today? @FANNG1 @caican00 , thanks.
   
   https://github.com/apache/gravitino/pull/4403#discussion_r1713127894
   @FANNG1 Do you have any further comments? after https://github.com/apache/gravitino/pull/4468 is merged, we can re-trigger the pipelines again.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1712972261


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   @FANNG1 just building spark-connector with scala2.13, i think it is insignificant compared to the time spent for all the jobs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710825927


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/iceberg/extensions/IcebergExtendedDataSourceV2Strategy.java:
##########
@@ -81,7 +84,7 @@ public Seq<SparkPlan> apply(LogicalPlan plan) {
     } else if (plan instanceof CreateOrReplaceBranch) {
       CreateOrReplaceBranch createOrReplaceBranch = (CreateOrReplaceBranch) plan;
       return IcebergCatalogAndIdentifier.buildCatalogAndIdentifier(
-              spark, createOrReplaceBranch.table())
+              spark, createOrReplaceBranch.table().toIndexedSeq())

Review Comment:
   ```
   error: apply(LogicalPlan) in IcebergExtendedDataSourceV2Strategy cannot override apply(LogicalPlan) in GenericStrategy
     public Seq<SparkPlan> apply(LogicalPlan plan) {
                           ^
     return type scala.collection.Seq<SparkPlan> is not compatible with scala.collection.immutable.Seq<SparkPlan>
   
   ```
   **scala2.12:**
   `type Seq[+A] = _root_.scala.collection.Seq[A]`
   
   The `type scala.Seq` in scala2.12 represents the  `scala.collection.Seq`, `toIndexedSeq` can change the return type to `scala.collection.immutable.Seq`. and `scala.collection.immutable.Seq` is a sub `trait` of `scala.collection.Seq` in scala2.12.
   
   **scala2.13:**
   
   ```
     @migration("scala.Seq is now scala.collection.immutable.Seq instead of scala.collection.Seq", "2.13.0")
     type Seq[+A] = scala.collection.immutable.Seq[A]
     val Seq = scala.collection.immutable.Seq
   ```
   
   The `type scala.Seq` in scala2.13 represents the  `scala.collection.immutable.Seq`.
   
   
   and the return type of the apply function is `type scala.Seq`, to compatible with scala2.13, we have to return to `scala.collection.immutable.Seq` explicitly
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2277267339

   @FANNG1 could you help review again? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708476237


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting
+  public static List<String> toJavaList(Seq<String> seq) {

Review Comment:
   is it possible seq is null?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708486402


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/iceberg/extensions/IcebergExtendedDataSourceV2Strategy.java:
##########
@@ -81,7 +84,7 @@ public Seq<SparkPlan> apply(LogicalPlan plan) {
     } else if (plan instanceof CreateOrReplaceBranch) {
       CreateOrReplaceBranch createOrReplaceBranch = (CreateOrReplaceBranch) plan;
       return IcebergCatalogAndIdentifier.buildCatalogAndIdentifier(
-              spark, createOrReplaceBranch.table())
+              spark, createOrReplaceBranch.table().toIndexedSeq())

Review Comment:
   why changing `toIndexedSeq`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708478607


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting
+  public static List<String> toJavaList(Seq<String> seq) {

Review Comment:
   ooh, i will add a check here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711577762


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   I couldn't understand `new stage`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1707008825


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -58,7 +58,7 @@ jobs:
       matrix:
         architecture: [linux/amd64]
         java-version: [ 8, 11, 17 ]
-        scala-version: [ 2.12 ]
+        scala-version: [ 2.12, 2.13 ]

Review Comment:
   There are test errors in the ci, could you fix it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708758034


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting

Review Comment:
   it's used in different packages, should remove `VisibleForTesting`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711145748


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   There may be one problem in current pipeline, if `Build with Gradle` failed but `Build spark` successful, no log is updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713220133


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   > > so what's the benefit of using a job not a step?
   > 
   > @FANNG1 It does not affect the job named `build` and they can be built in parallel.
   
   ![image](https://github.com/user-attachments/assets/c5ce9ff9-a524-4e67-9ba4-a82d780e023e)
   cc @FANNG1 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1706749564


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -58,7 +58,7 @@ jobs:
       matrix:
         architecture: [linux/amd64]
         java-version: [ 8, 11, 17 ]
-        scala-version: [ 2.12 ]
+        scala-version: [ 2.12, 2.13 ]

Review Comment:
   @FANNG1 should we add the scala2.13 jobs to the pipeline?
   i add scala2.13 in the pipeline to test in the PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710977063


##########
.github/workflows/build.yml:
##########
@@ -107,3 +107,41 @@ jobs:
             build/reports
             catalogs/**/*.log
             catalogs/**/*.tar
+
+  spark-connector-build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        scala-version: [ 2.12, 2.13 ]
+    timeout-minutes: 30
+    needs: changes
+    if: needs.changes.outputs.source_changes == 'true'
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-java@v4
+        with:
+          java-version: 8
+          distribution: 'temurin'
+          cache: 'gradle'
+
+      - name: Free up disk space
+        run: |
+          dev/ci/util_free_space.sh
+
+      - name: Build with Gradle

Review Comment:
   How about adding a separate step in `build` named like `Build spark connector with scala 2.13` to build and test scala 2.13 packages.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1707077652


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -58,7 +58,7 @@ jobs:
       matrix:
         architecture: [linux/amd64]
         java-version: [ 8, 11, 17 ]
-        scala-version: [ 2.12 ]
+        scala-version: [ 2.12, 2.13 ]

Review Comment:
   > There are test errors in the ci, could you fix it?
   
   sure



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711138057


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13
+        run: |
+          ./gradlew -PscalaVersion=2.13 :spark-connector:spark-3.4:test

Review Comment:
   Could you use the command below to skip ITs?
   ```
    ./gradlew  :spark-connector:spark-3.4:test -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -PscalaVersion=2.13 
    ./gradlew  :spark-connector:spark-3.5:test -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -PscalaVersion=2.13 
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2273100552

   > Could you run pass the IT? seems there are still some problems in runtime.
   
   ![image](https://github.com/user-attachments/assets/deb98896-62ca-40c1-bbd3-401bb877c2cf)
   
   i tested it with scala2.13 and java17 locally, and run successfully. 
   could you provide the way to reproduce? @FANNG1 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1712874458


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   What my concern is this will add more extra steps  to make build time much longer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2272548565

   @FANNG1 can you please help to review this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1712562946


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   @FANNG1 what I mean is to add it as a new job for the build workflow, like this:
   
   ```
   
     spark-connector-build:
       runs-on: ubuntu-latest
       strategy:
         matrix:
           scala-version: [ 2.12, 2.13 ]
       timeout-minutes: 30
       needs: changes
       if: needs.changes.outputs.source_changes == 'true'
       steps:
         - uses: actions/checkout@v3
   
         - uses: actions/setup-java@v4
           with:
             java-version: 8
             distribution: 'temurin'
             cache: 'gradle'
   
         - name: Free up disk space
           run: |
             dev/ci/util_free_space.sh
   
         - name: Build with Gradle
           run: |
             if [ "${{ matrix.scala-version }}" == "2.12" ];then 
               ./gradlew -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.3:test
             fi
             ./gradlew -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.4:test
             ./gradlew -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.5:test
   
         - name: Upload unit tests report
           uses: actions/upload-artifact@v3
           if: failure()
           with:
             name: unit test report
             path: |
               build/reports
               spark-connector/**/*.log
   
   ```
   
   after the `changes` succeeded, the `spark-connector-build` can be executed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2273108836

   @FANNG1 should we add the scala2.13 jobs to the pipeline? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711100217


##########
.github/workflows/build.yml:
##########
@@ -107,3 +107,41 @@ jobs:
             build/reports
             catalogs/**/*.log
             catalogs/**/*.tar
+
+  spark-connector-build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        scala-version: [ 2.12, 2.13 ]
+    timeout-minutes: 30
+    needs: changes
+    if: needs.changes.outputs.source_changes == 'true'
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-java@v4
+        with:
+          java-version: 8
+          distribution: 'temurin'
+          cache: 'gradle'
+
+      - name: Free up disk space
+        run: |
+          dev/ci/util_free_space.sh
+
+      - name: Build with Gradle

Review Comment:
   @FANNG1 just test scala2.13, not considering scala2.12?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710825927


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/iceberg/extensions/IcebergExtendedDataSourceV2Strategy.java:
##########
@@ -81,7 +84,7 @@ public Seq<SparkPlan> apply(LogicalPlan plan) {
     } else if (plan instanceof CreateOrReplaceBranch) {
       CreateOrReplaceBranch createOrReplaceBranch = (CreateOrReplaceBranch) plan;
       return IcebergCatalogAndIdentifier.buildCatalogAndIdentifier(
-              spark, createOrReplaceBranch.table())
+              spark, createOrReplaceBranch.table().toIndexedSeq())

Review Comment:
   ```
   error: apply(LogicalPlan) in IcebergExtendedDataSourceV2Strategy cannot override apply(LogicalPlan) in GenericStrategy
     public Seq<SparkPlan> apply(LogicalPlan plan) {
                           ^
     return type scala.collection.Seq<SparkPlan> is not compatible with scala.collection.immutable.Seq<SparkPlan>
   
   ```
   
   The `type scala.Seq` in scala2.13 represents the  `scala.collection.immutable.Seq`, `toIndexedSeq` can change the return type to `scala.collection.immutable.Seq`.
   and `IndexedSeq` is a sub `trait` of `scala.collection.immutable.Seq`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1712972261


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   imo, it is insignificant compared to the time taking for all the jobs



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2277365929

   > @FANNG1 could you help review again?
   
   just one comment


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708478607


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting
+  public static List<String> toJavaList(Seq<String> seq) {

Review Comment:
   ooh, i will add a validation for seq.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708391416


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -92,9 +92,13 @@ jobs:
         run: |
           if [ "${{ matrix.scala-version }}" == "2.12" ];then 
             ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.3:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.4:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.5:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+          fi
+          if [ "${{ matrix.scala-version }}" == "2.13" ];then 
+            ./gradlew -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.4:test

Review Comment:
   I think we must provide a way to test for compatibility with scala2.13, and if adding scala2.13 will make the pipelines too slow, we can skip docker tests. WDYT? @FANNG1 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708724572


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting

Review Comment:
   any problem here? remove it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711168888


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   why not add it in a new stage, WDYT? @FANNG1 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2283059358

   Is everything done, can we move fast to make this merged today?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713227960


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   cool



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2283276833

   @caican00 merged to main, thanks for your work


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1710825927


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/iceberg/extensions/IcebergExtendedDataSourceV2Strategy.java:
##########
@@ -81,7 +84,7 @@ public Seq<SparkPlan> apply(LogicalPlan plan) {
     } else if (plan instanceof CreateOrReplaceBranch) {
       CreateOrReplaceBranch createOrReplaceBranch = (CreateOrReplaceBranch) plan;
       return IcebergCatalogAndIdentifier.buildCatalogAndIdentifier(
-              spark, createOrReplaceBranch.table())
+              spark, createOrReplaceBranch.table().toIndexedSeq())

Review Comment:
   ```
   error: apply(LogicalPlan) in IcebergExtendedDataSourceV2Strategy cannot override apply(LogicalPlan) in GenericStrategy
     public Seq<SparkPlan> apply(LogicalPlan plan) {
                           ^
     return type scala.collection.Seq<SparkPlan> is not compatible with scala.collection.immutable.Seq<SparkPlan>
   
   ```
   **scala2.12:**
   `type Seq[+A] = _root_.scala.collection.Seq[A]`
   
   The `type scala.Seq` in scala2.12 represents the  `scala.collection.Seq`, `toIndexedSeq` can change the return type to `scala.collection.immutable.Seq`. and `scala.collection.immutable.Seq` is a sub `trait` of `scala.collection.Seq` in scala2.12.
   
   **scala2.13:**
   
   ```
     @migration("scala.Seq is now scala.collection.immutable.Seq instead of scala.collection.Seq", "2.13.0")
     type Seq[+A] = scala.collection.immutable.Seq[A]
     val Seq = scala.collection.immutable.Seq
   ```
   
   The `type scala.Seq` in scala2.13 represents the  `scala.collection.immutable.Seq`.
   
   
   
   and the return type of the `apply` function is `type scala.Seq`, to compatible with scala2.13, we have to return to `scala.collection.immutable.Seq` explicitly
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1711156660


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   @jerryshao @xunliu @yuqi1129  please help to review the pipeline changes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1712972261


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   @FANNG1 it is insignificant compared to the time spent for all the jobs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2277602811

   ```
   CatalogDorisDriverIT > initializationError FAILED
       org.testcontainers.containers.ContainerLaunchException: Container startup failed for image datastrato/gravitino-ci-doris:0.1.5
           at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:361)
           at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:334)
           at org.apache.gravitino.integration.test.container.BaseContainer.start(BaseContainer.java:154)
           at org.apache.gravitino.integration.test.container.DorisContainer.start(DorisContainer.java:77)
           at org.apache.gravitino.integration.test.container.ContainerSuite.startDorisContainer(ContainerSuite.java:236)
           at org.apache.gravitino.catalog.doris.integration.test.CatalogDorisIT.startup(CatalogDorisIT.java:119)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
   
   ```
   
   please help re-trigger the pipeline, Thanks @FANNG1 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2273475514

   > > Could you run pass the IT? seems there are still some problems in runtime.
   > 
   > ![image](https://private-user-images.githubusercontent.com/94670132/355769781-deb98896-62ca-40c1-bbd3-401bb877c2cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMwMzYzNDQsIm5iZiI6MTcyMzAzNjA0NCwicGF0aCI6Ii85NDY3MDEzMi8zNTU3Njk3ODEtZGViOTg4OTYtNjJjYS00MGMxLWJiZDMtNDAxYmI4NzdjMmNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA3VDEzMDcyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTczMTY2NDgxNTkyNWU2YWM2OTA0OTI5MGYwOWE2ZGY1Y2I4MTY2Yzk2Y2ZlM2E5Zjg0MzNiNTk1NTc4ZmUwOTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.smfjqbEG5W1VcQU0qo2lfkbxBzHMkzqofspArvyMj7U)
   > 
   > i tested it with scala2.13 and java17 locally, and ran successfully. could you provide the way to reproduce? @FANNG1
   
   I could run successfully now, and couldn't reproduce it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713113701


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   so what's the benefit of using a job not a step?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1713127894


##########
.github/workflows/build.yml:
##########
@@ -98,6 +98,11 @@ jobs:
       - name: Build with Gradle
         run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build
 
+      - name: Build spark connector with scala 2.13

Review Comment:
   > so what's the benefit of using a job not a step?
   
   @FANNG1 It does not affect the job named `build` and they can be built in parallel.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#issuecomment-2271166517

   cc @FANNG1 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708483440


##########
.github/workflows/spark-integration-test.yml:
##########
@@ -92,9 +92,13 @@ jobs:
         run: |
           if [ "${{ matrix.scala-version }}" == "2.12" ];then 
             ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.3:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.4:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+            ./gradlew -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} -PskipDockerTests=false :spark-connector:spark-3.5:test --tests "org.apache.gravitino.spark.connector.integration.test.**"
+          fi
+          if [ "${{ matrix.scala-version }}" == "2.13" ];then 
+            ./gradlew -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -PscalaVersion=${{ matrix.scala-version }} :spark-connector:spark-3.4:test

Review Comment:
   How about add spark connector build and UT with scala2.13  in `.github/workflows/build.yml`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4386] Fix(spark-connector): spark connector build failed with scala2.13 [gravitino]

Posted by "caican00 (via GitHub)" <gi...@apache.org>.
caican00 commented on code in PR #4403:
URL: https://github.com/apache/gravitino/pull/4403#discussion_r1708724572


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/utils/ConnectorUtil.java:
##########
@@ -37,4 +41,11 @@ public static String removeDuplicateSparkExtensions(
         .reduce((element1, element2) -> element1 + ConnectorConstants.COMMA + element2)
         .orElse("");
   }
+
+  @VisibleForTesting

Review Comment:
   any problem here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org