[ https://issues.apache.org/jira/browse/HIVE-27168?focusedWorklogId=852793&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-852793 ]
ASF GitHub Bot logged work on HIVE-27168: ----------------------------------------- Author: ASF GitHub Bot Created on: 24/Mar/23 09:07 Start Date: 24/Mar/23 09:07 Worklog Time Spent: 10m Work Description: InvisibleProgrammer commented on code in PR #4144: URL: https://github.com/apache/hive/pull/4144#discussion_r1147291829 ########## standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java: ########## @@ -1251,4 +1251,19 @@ public static String getHttpPath(String httpPath) { } return httpPath; } + + /** + * Function to get the base name of the column type. + * @param colType column type + * @return base name of the column type + */ + public static String getBaseNameOfColType(String colType) { + // char, varchar types can have parameters such as + // char/varchar length. We only need the base name. + int idx = colType.indexOf('('); Review Comment: Got it, thx. Issue Time Tracking ------------------- Worklog Id: (was: 852793) Time Spent: 1h 20m (was: 1h 10m) > Use basename of the datatype when fetching partition metadata using partition > filters > ------------------------------------------------------------------------------------- > > Key: HIVE-27168 > URL: https://issues.apache.org/jira/browse/HIVE-27168 > Project: Hive > Issue Type: Bug > Reporter: Sourabh Badhya > Assignee: Sourabh Badhya > Priority: Major > Labels: pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > While fetching partition metadata using partition filters, we use the column > type of the table directly. However, char/varchar types can contain extra > information such as length of the char/varchar column and hence it skips > fetching partition metadata due to this extra information. > Solution: Use the basename of the column type while deciding on whether > partition pruning can be done on the partitioned column. -- This message was sent by Atlassian Jira (v8.20.10#820010)