Skip to content
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

Iceberg Spark Extensions conflict with Paimon #10143

Open
wForget opened this issue Apr 15, 2024 · 2 comments
Open

Iceberg Spark Extensions conflict with Paimon #10143

wForget opened this issue Apr 15, 2024 · 2 comments
Labels
improvement PR that improves existing functionality

Comments

@wForget
Copy link
Member

wForget commented Apr 15, 2024

Feature Request / Improvement

The Call syntax is defined in both Iceberg and Paimon, which may cause conflicts when I introduce their SparkSessionExtensions at the same time.

Reproduce:

spark.sql.extensions=org.apache.paimon.spark.extensions.PaimonSparkSessionExtensions,org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions

-- create iceberg table
CREATE TABLE iceberg_catalog.sample.iceberg_t1 (
    user_id BIGINT,
    item_id BIGINT,
    behavior STRING,
    dt STRING,
    hh STRING
) using iceberg;

-- create paimon table
CREATE TABLE paimon_catalog.sample.paimon_t1 (
    user_id BIGINT,
    item_id BIGINT,
    behavior STRING,
    dt STRING,
    hh STRING
) TBLPROPERTIES (
    'primary-key' = 'dt,hh,user_id'
);

-- Successed
CALL iceberg_catalog.system.remove_orphan_files(table => "sample.iceberg_t1");

-- Failed, use iceberg ResolveProcedures
CALL paimon_catalog.sys.remove_orphan_files(table => "sample.paimon_t1");

One idea:
If currentCatalog is not Spark Session catalog and Iceberg Spark Catalog, we first use delegate parser to parse sqlText in IcebergSparkSqlExtensionsParser#parsePlan.

Query engine

Spark

@wForget wForget added the improvement PR that improves existing functionality label Apr 15, 2024
@ajantha-bhat
Copy link
Member

ajantha-bhat commented Apr 16, 2024

can you close this if it is a duplicate of apache/paimon#3212 ?

Never mind. I think what you mean it can be fixed either by Iceberg or by paimon?

@wForget
Copy link
Member Author

wForget commented Apr 17, 2024

Never mind. I think what you mean it can be fixed either by Iceberg or by paimon?

Yes, I'm not sure if my idea is acceptable, so I submitted issues on both sides hoping to get more suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement PR that improves existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants