cxzl25 commented on code in PR #2576:
URL: https://github.com/apache/incubator-kyuubi/pull/2576#discussion_r867464389


##########
pom.xml:
##########
@@ -963,138 +964,10 @@
                 <version>${iceberg.version}</version>
             </dependency>
 
-            <!-- Hudi dependency  -->
-            <!--
-              We don't use hadoop-common directly, it's only for suppressing 
exception:
-                 Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project
-                 kyuubi-spark-sql-engine_2.12: Error creating shaded jar: 
Could not resolve following dependencies:
-                 [jdk.tools:jdk.tools:jar:1.6 (system)]
-
-              The issue only occurs on GitHub Action environment with Hudi 
0.10.0 and JDK 11.
-              After few days digging, only found one place introduces 
jdk.tools,
-
-              - org.apache.hudi:hudi-common:jar:0.10.0:test
-                - org.apache.hbase:hbase-server:jar:1.2.3:test
-                  - org.apache.hadoop:hadoop-common:jar:2.5.1:test
-                    - org.apache.hadoop:hadoop-annotations:jar:2.5.1:test
-                      - jdk.tools:jdk.tools:jar:1.6:system
-            -->
-            <dependency>
-                <groupId>org.apache.hadoop</groupId>
-                <artifactId>hadoop-common</artifactId>
-                <version>${hadoop.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.parquet</groupId>
-                <artifactId>parquet-avro</artifactId>
-                <version>${parquet.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.spark</groupId>
-                <artifactId>spark-avro_${scala.binary.version}</artifactId>
-                <version>${spark.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.hudi</groupId>
-                
<artifactId>hudi-spark-common_${scala.binary.version}</artifactId>

Review Comment:
   Because the `nodePatterns` field is added to the `Command` of Spark3.2.0 
([SPARK-35544](https://issues.apache.org/jira/browse/SPARK-35544)) , and 
`hudi-spark-common_2.12` is compiled with the default `Spark2.4.4`, there will 
be an `AbstractMethodError` problem here.
   
   ## How to reproduce this problem
   ```xml
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-sql_2.12</artifactId>
               <version>3.2.1</version>
           </dependency>
   
           <dependency>
               <groupId>org.apache.hudi</groupId>
               <artifactId>hudi-spark-common_2.12</artifactId>
               <version>0.11.0</version>
           </dependency>
   ```
   ```scala
   DropHoodieTableCommand(TableIdentifier("", Option("")), false, false, false)
   ```
   ```
   Exception in thread "main" java.lang.AbstractMethodError: Method 
org/apache/spark/sql/hudi/command/DropHoodieTableCommand.org$apache$spark$sql$catalyst$plans$logical$Command$_setter_$nodePatterns_$eq(Lscala/collection/Seq;)V
 is abstract
        at 
org.apache.spark.sql.hudi.command.DropHoodieTableCommand.org$apache$spark$sql$catalyst$plans$logical$Command$_setter_$nodePatterns_$eq(DropHoodieTableCommand.scala)
        at 
org.apache.spark.sql.catalyst.plans.logical.Command.$init$(Command.scala:38)
        at 
org.apache.spark.sql.hudi.command.DropHoodieTableCommand.<init>(DropHoodieTableCommand.scala:38)
   ```
   ## Use bundle
   If we use spark bundle, we don't have this problem.
   
   ```xml
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-sql_2.12</artifactId>
               <version>3.2.1</version>
           </dependency>
   
           <dependency>
               <groupId>org.apache.hudi</groupId>
               <artifactId>hudi-spark3.2-bundle_2.12</artifactId>
               <version>0.11.0</version>
           </dependency>
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to