flaming-archer commented on code in PR #7067:
URL: https://github.com/apache/gravitino/pull/7067#discussion_r2067755940
##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/hive/SparkHiveTable.java:
##########
@@ -76,4 +80,50 @@ public Map<String, String> properties() {
public Transform[] partitioning() {
return gravitinoTableInfoHelper.partitioning();
}
+
+ @Override
+ public void createPartition(InternalRow ident, Map<String, String>
properties)
+ throws PartitionAlreadyExistsException, UnsupportedOperationException {
+ gravitinoTableInfoHelper.createPartition(ident, properties,
partitionSchema());
+ }
+
+ @Override
+ public boolean dropPartition(InternalRow ident) {
+ return gravitinoTableInfoHelper.dropPartition(ident, partitionSchema());
+ }
+
+ @Override
+ public void replacePartitionMetadata(InternalRow ident, Map<String, String>
properties)
+ throws NoSuchPartitionException, UnsupportedOperationException {
+ throw new UnsupportedOperationException("Partition replace is not
supported");
Review Comment:
> `Partition replace` -> `Partition replacement` or `Replace partition`?
When implemts the spark datasource v2 SupportsPartitionManagement , the
compiler prompts that these methods need to be implemented.
##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/hive/SparkHiveTable.java:
##########
@@ -76,4 +80,50 @@ public Map<String, String> properties() {
public Transform[] partitioning() {
return gravitinoTableInfoHelper.partitioning();
}
+
+ @Override
+ public void createPartition(InternalRow ident, Map<String, String>
properties)
+ throws PartitionAlreadyExistsException, UnsupportedOperationException {
+ gravitinoTableInfoHelper.createPartition(ident, properties,
partitionSchema());
+ }
+
+ @Override
+ public boolean dropPartition(InternalRow ident) {
+ return gravitinoTableInfoHelper.dropPartition(ident, partitionSchema());
+ }
+
+ @Override
+ public void replacePartitionMetadata(InternalRow ident, Map<String, String>
properties)
+ throws NoSuchPartitionException, UnsupportedOperationException {
+ throw new UnsupportedOperationException("Partition replace is not
supported");
+ }
+
+ @Override
+ public Map<String, String> loadPartitionMetadata(InternalRow ident)
+ throws UnsupportedOperationException {
+ return gravitinoTableInfoHelper.loadPartitionMetadata(ident,
partitionSchema());
+ }
+
+ @Override
+ public InternalRow[] listPartitionIdentifiers(String[] names, InternalRow
ident) {
+ return gravitinoTableInfoHelper.listPartitionIdentifiers(names, ident,
partitionSchema());
+ }
+
+ @Override
+ public Object productElement(int n) {
Review Comment:
When implemts the spark datasource v2 SupportsPartitionManagement , the
compiler prompts that these methods need to be implemented.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]