You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2023/03/24 10:46:26 UTC

[GitHub] [incubator-paimon] JingsongLi opened a new pull request, #711: [core] Public API and add partitionKeys,primaryKeys,options to table

JingsongLi opened a new pull request, #711:
URL: https://github.com/apache/incubator-paimon/pull/711

   
   ### Purpose
   
   - Public API 
   - add partitionKeys, primaryKeys, options to Table API
   
   ### Tests
   
   No
   
   ### API and Format 
   
   Yes
   
   ### Documentation
   
   Will do later


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] SteNicholas merged pull request #711: [core] Public API and add partitionKeys,primaryKeys,options to table

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas merged PR #711:
URL: https://github.com/apache/incubator-paimon/pull/711


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] yuzelin commented on a diff in pull request #711: [core] Public API and add partitionKeys,primaryKeys,options to table

Posted by "yuzelin (via GitHub)" <gi...@apache.org>.
yuzelin commented on code in PR #711:
URL: https://github.com/apache/incubator-paimon/pull/711#discussion_r1147449183


##########
paimon-core/src/main/java/org/apache/paimon/table/Table.java:
##########
@@ -41,6 +43,18 @@ public interface Table extends Serializable {
     /** Returns the row type of this table. */
     RowType rowType();
 
+    /** Partition keys of this table. */
+    List<String> partitionKeys();
+
+    /** Primary keys of this table. */
+    List<String> primaryKeys();
+
+    /** Options of this table. */
+    Map<String, String> options();
+
+    /** Optional comment of this table. */
+    Optional<String> comment();
+

Review Comment:
   Is it necessary to public `fileIO()` ? I think it's useful for creating `SnapshotManager` and `SchemaManager`.



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] SteNicholas commented on a diff in pull request #711: [core] Public API and add partitionKeys,primaryKeys,options to table

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #711:
URL: https://github.com/apache/incubator-paimon/pull/711#discussion_r1147481355


##########
paimon-core/src/main/java/org/apache/paimon/table/system/AuditLogTable.java:
##########
@@ -105,6 +106,21 @@ public RowType rowType() {
         return new RowType(fields);
     }
 
+    @Override
+    public List<String> partitionKeys() {
+        return dataTable.partitionKeys();
+    }
+
+    @Override
+    public Map<String, String> options() {
+        return dataTable.options();
+    }
+
+    @Override
+    public List<String> primaryKeys() {
+        return Collections.emptyList();

Review Comment:
   ```suggestion
           return Collections.singleList(dataTable.options().get("primary-key"));
   ```



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] SteNicholas commented on a diff in pull request #711: [core] Public API and add partitionKeys,primaryKeys,options to table

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #711:
URL: https://github.com/apache/incubator-paimon/pull/711#discussion_r1147508040


##########
paimon-core/src/main/java/org/apache/paimon/table/Table.java:
##########
@@ -41,6 +43,18 @@ public interface Table extends Serializable {
     /** Returns the row type of this table. */
     RowType rowType();
 
+    /** Partition keys of this table. */
+    List<String> partitionKeys();
+
+    /** Primary keys of this table. */
+    List<String> primaryKeys();
+
+    /** Options of this table. */
+    Map<String, String> options();
+
+    /** Optional comment of this table. */
+    Optional<String> comment();
+

Review Comment:
   @yuzelin, `SnapshotManager` and `SchemaManager` aren't public and the creation of these manager aren't exposed to users, therefore `fileIO` doesn't need to make it public.



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] SteNicholas closed pull request #711: [core] Public API and add partitionKeys,primaryKeys,options to table

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas closed pull request #711: [core] Public API and add partitionKeys,primaryKeys,options to table
URL: https://github.com/apache/incubator-paimon/pull/711


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org