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

[#4731] feat(paimon-spark-conenctor): Support delete, update and mergeInto paimon table in paimon spark connector #5864

Open
wants to merge 55 commits into
base: main
Choose a base branch
from

Conversation

caican00
Copy link
Collaborator

What changes were proposed in this pull request?

Support delete, update and mergeInto paimon table in paimon spark connector

Why are the changes needed?

Fix: #4731

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New ITs.

caican and others added 25 commits December 5, 2024 15:39
…avitino into support-paimon-connector-partition-management
…b.com:caican00/gravitino into support-paimon-connector-partition-management
…b.com:caican00/gravitino into support-paimon-connector-hive-backend
…ican00/gravitino into support-paimon-connector-jdbc-backend
…ican00/gravitino into support-paimon-connector-function
…00/gravitino into support-paimon-connector-time-travel
…can00/gravitino into support-paimon-connector-extensions
…avitino into support-paimon-connector-extensions
Copy link
Contributor

@tengqm tengqm left a comment

Choose a reason for hiding this comment

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

This PR is too big to review ...

@@ -34,7 +34,7 @@
*/
public class PaimonSchemaPropertiesMetadata extends BasePropertiesMetadata {

public static final String COMMENT = "comment";
public static final String COMMENT = PaimonConstants.COMMENT;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have this constant copied into PaimonSchemaPropertiesMetadata?

Comment on lines +38 to +45
public static final String COMMENT = PaimonConstants.COMMENT;
public static final String OWNER = PaimonConstants.OWNER;
public static final String BUCKET_KEY = PaimonConstants.BUCKET_KEY;
public static final String MERGE_ENGINE = PaimonConstants.MERGE_ENGINE;
public static final String SEQUENCE_FIELD = PaimonConstants.SEQUENCE_FIELD;
public static final String ROWKIND_FIELD = PaimonConstants.ROWKIND_FIELD;
public static final String PRIMARY_KEY = PaimonConstants.PRIMARY_KEY;
public static final String PARTITION = PaimonConstants.PARTITION;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above. Why do we replicate these constants?

} catch (NoSuchTableException e) {
throw new RuntimeException(
String.format(
"Failed to load the real sparkTable: %s",
Copy link
Contributor

Choose a reason for hiding this comment

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

is sparkeTable a well known term in the community?


public class PaimonPropertiesConstants {

public static final String GRAVITINO_PAIMON_CATALOG_BACKEND = PaimonConstants.CATALOG_BACKEND;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm really confused by this pattern of copying constant definitions.
The referenced constant is defined for Paimon, and we are now inside a Paimon specific class, but we are copying these constants inside the same logical package.
We are giving these constants new names, by prepending many terms.

The result? We get a new public class, giving many existing constants new aliases.
A new Java file, with many long constant names ...

Comment on lines -30 to +35
"hive-3.3", "org.apache.gravitino.spark.connector.hive.GravitinoHiveCatalogSpark33",
"hive-3.4", "org.apache.gravitino.spark.connector.hive.GravitinoHiveCatalogSpark34",
"hive-3.5", "org.apache.gravitino.spark.connector.hive.GravitinoHiveCatalogSpark35",
"hive-3.3",
"org.apache.gravitino.spark.connector.hive.GravitinoHiveCatalogSpark33",
"hive-3.4",
"org.apache.gravitino.spark.connector.hive.GravitinoHiveCatalogSpark34",
"hive-3.5",
"org.apache.gravitino.spark.connector.hive.GravitinoHiveCatalogSpark35",
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes really hurts the readability of the source.

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.

[Subtask] support delete, update and mergeInto paimon table in paimon spark connector
2 participants