lordk911 opened a new issue, #11821:
URL: https://github.com/apache/iceberg/issues/11821

   ### Apache Iceberg version
   
   1.6.1
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   **spark 3.4.4**
   
   table ddl: 
   
   ```
   create table if not exists test.ice_test
   (
     id                    string          comment '',
     order_id              string          comment '',
     lock_id               string          comment ''
   )
   using iceberg
   TBLPROPERTIES (
    'write.metadata.delete-after-commit.enabled'=true,
    'write.metadata.previous-versions-max'=10,
    'format-version'=2,
    'write.merge.mode'='merge-on-read');
   ```
   
   sql to merge table: 
   
   `MERGE INTO test.ice_test a USING  test.product_tmp b ON a.id = b.id when 
matched then delete;`
   
   Exception: 
   
   ```
   java.lang.NoSuchMethodError: 
org.apache.spark.sql.catalyst.ProjectingInternalRow.<init>(Lorg/apache/spark/sql/types/StructType;Lscala/collection/Seq;)V
     at 
org.apache.spark.sql.catalyst.analysis.RewriteRowLevelIcebergCommand.newLazyProjection(RewriteRowLevelIcebergCommand.scala:121)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteRowLevelIcebergCommand.buildDeltaProjections(RewriteRowLevelIcebergCommand.scala:86)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteRowLevelIcebergCommand.buildDeltaProjections$(RewriteRowLevelIcebergCommand.scala:75)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$.buildDeltaProjections(RewriteMergeIntoTable.scala:75)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$.buildDeltaProjections(RewriteMergeIntoTable.scala:412)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$.org$apache$spark$sql$catalyst$analysis$RewriteMergeIntoTable$$buildWriteDeltaPlan(RewriteMergeIntoTable.scala:315)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$$anonfun$apply$1.applyOrElse(RewriteMergeIntoTable.scala:156)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$$anonfun$apply$1.applyOrElse(RewriteMergeIntoTable.scala:84)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.$anonfun$resolveOperatorsDownWithPruning$2(AnalysisHelper.scala:170)
     at 
org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:104)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.$anonfun$resolveOperatorsDownWithPruning$1(AnalysisHelper.scala:170)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper$.allowInvokingTransformsInAnalyzer(AnalysisHelper.scala:323)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.resolveOperatorsDownWithPruning(AnalysisHelper.scala:168)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.resolveOperatorsDownWithPruning$(AnalysisHelper.scala:164)
     at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolveOperatorsDownWithPruning(LogicalPlan.scala:31)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.resolveOperatorsWithPruning(AnalysisHelper.scala:99)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.resolveOperatorsWithPruning$(AnalysisHelper.scala:96)
     at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolveOperatorsWithPruning(LogicalPlan.scala:31)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.resolveOperators(AnalysisHelper.scala:76)
     at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.resolveOperators$(AnalysisHelper.scala:75)
     at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolveOperators(LogicalPlan.scala:31)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$.apply(RewriteMergeIntoTable.scala:84)
     at 
org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTable$.apply(RewriteMergeIntoTable.scala:75)
     at 
org.apache.spark.sql.catalyst.rules.RuleExecutor.$anonfun$execute$2(RuleExecutor.scala:222)
   ```
   
   **if change write.merge.mode to copy-on-write the MERGE INTO statement can 
be executed successfully.**
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [X] I cannot contribute a fix for this bug at this time


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to