Skip to content

[spark] Spark 3.3 throws write exceptions during partial-update engine operations #5933

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Aiden-Dong
Copy link
Contributor

Purpose

Linked issue: #5932

fix bug with Spark 3.3 throws write exceptions during partial-update engine operations

CREATE TABLE T( 
    f1 int, 
    f2 string, 
    f3 string, 
    f4 string) 
 TBLPROPERTIES (    
  'bucket'='1', 
  'primary-key'='f1', 
  'write-only'='true', 
  'merge-engine'='partial-update',   
  'file.format'='parquet', 
  'file.compression' = 'zstd'  
 )
INSERT INTO T(f1, f4) VALUES(1, 'test')

Tests

spark.sql(
      "CREATE TABLE T( f1 int, f2 string, f3 string, f4 string)\n" +
        "TBLPROPERTIES (\n" + "  'bucket'='1',\n" +
        "  'primary-key'='f1',\n" +
        "  'write-only'='true',\n" +
        "  'merge-engine'='partial-update',\n" + "" +
        "  'file.format'='parquet',\n" +
        "  'file.compression' = 'zstd'\n" + ")")

    spark.sql("INSERT INTO T(f1, f4) VALUES(1, 'test')")

    checkAnswer(
      spark.sql("SELECT * FROM T"),
      Row(1, null, null, "test")
    )

API and Format

Documentation

@JingsongLi JingsongLi closed this Jul 22, 2025
@JingsongLi JingsongLi reopened this Jul 22, 2025
@JingsongLi JingsongLi closed this Jul 22, 2025
@JingsongLi JingsongLi reopened this Jul 22, 2025
PaimonShowTablesExtendedCommand(catalog.asTableCatalog, ns, pattern, output)
}

case insertPlan @ InsertIntoStatement(
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting function, so that we don't need a higher version of Spark and we can only specify some columns to update.


[SPARK-38795][SQL] Support INSERT INTO user specified column lists with DEFAULT values

https://issues.apache.org/jira/browse/SPARK-38795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants