Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/653#discussion_r36604993
  
    --- Diff: 
tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java
 ---
    @@ -2259,6 +2261,41 @@ public void addPartitions(String databaseName, 
String tableName, List<CatalogPro
           CatalogUtil.closeQuietly(pstmt4);
         }
       }
    +  @Override
    +  public List<TablePartitionKeysProto> getAllPartitionKeys() throws 
CatalogException {
    +    Connection conn = null;
    +    Statement stmt = null;
    +    ResultSet resultSet = null;
    +
    +    List<TablePartitionKeysProto> partitions = new 
ArrayList<TablePartitionKeysProto>();
    +
    +    try {
    +      String sql = " SELECT C." + COL_PARTITIONS_PK + ", C.COLUMN_NAME, 
C.PARTITION_VALUE " +
    +        " FROM " + TB_TABLES + " A " +
    +        " JOIN " + TB_PARTTIONS + " B ON A." + COL_TABLES_PK + " = B." + 
COL_TABLES_PK
    --- End diff --
    
    Since it is guaranteed that the tables corresponding to partitions always 
exist, join looks not necessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to