Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/19109 )
Change subject: IMPALA-11390: Describe formatted statement on materialized view should show the view definition ...................................................................... Patch Set 5: (1 comment) http://gerrit.cloudera.org:8080/#/c/19109/5/fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java File fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java: http://gerrit.cloudera.org:8080/#/c/19109/5/fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java@551 PS5, Line 551: // tableInfo.append(LINE_DELIM) : // .append("# Materialized View Source table information") : // .append(LINE_DELIM); : // TextMetaDataTable metaDataTable = new TextMetaDataTable(); : // metaDataTable.addRow("Table name", "I/U/D since last rebuild"); : // List<SourceTable> sourceTableList = : // new ArrayList<>(tbl.getCreationMetadata().getSourceTables()); : // sourceTableList.sort( : // Comparator : // .<SourceTable, String>comparing( : // sourceTable -> sourceTable.getTable().getDbName()) : // .thenComparing(sourceTable -> sourceTable.getTable().getTableName())); : // for (SourceTable sourceTable : sourceTableList) { : // String qualifiedTableName = TableName.getQualified( : // sourceTable.getTable().getCatName(), : // sourceTable.getTable().getDbName(), : // sourceTable.getTable().getTableName()); : // metaDataTable.addRow(qualifiedTableName, : // String.format("%d/%d/%d", : // sourceTable.getInsertedCount(), sourceTable.getUpdatedCount(), : // sourceTable.getDeletedCount())); : // tableInfo.append(metaDataTable.renderTable(isOutputPadded)); > Actually, I want to see if the community has a better solution to this kind When there are API difference between Apache Hive and CDP Hive, we put the logic in MetastoreShim: fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java is used when compiling with CDP Hive, and fe/src/compat-apache-hive-3/java/org/apache/impala/compat/MetastoreShim.java is used when compiling with Apache Hive3 (i.e. USE_APACHE_HIVE=true). So we can move this method into MetastoreShim as a solution. -- To view, visit http://gerrit.cloudera.org:8080/19109 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie62be1ca6d74370bad4b32bb046df93027e6f651 Gerrit-Change-Number: 19109 Gerrit-PatchSet: 5 Gerrit-Owner: pengdou <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jian Zhang <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: pengdou <[email protected]> Gerrit-Comment-Date: Mon, 12 Dec 2022 00:18:10 +0000 Gerrit-HasComments: Yes
