-
Notifications
You must be signed in to change notification settings - Fork 378
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
base: main
Are you sure you want to change the base?
[#4731] feat(paimon-spark-conenctor): Support delete, update and mergeInto paimon table in paimon spark connector #5864
Conversation
…avitino into support-paimon-connector-ddl
…avitino into support-paimon-connector-partition-management
…avitino into support-paimon-connector-ddl
…avitino into support-paimon-connector-ddl
…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
There was a problem hiding this 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; |
There was a problem hiding this comment.
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
?
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; |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 ...
"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", |
There was a problem hiding this comment.
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.
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.