@@ -433,7 +433,7 @@ public boolean canProvidePartitionStatistics(org.apache.hadoop.hive.ql.metadata.
433433 if (!getStatsSource ().equals (HiveMetaHook .ICEBERG )) {
434434 return false ;
435435 }
436- if (BaseHiveIcebergMetaHook .isIcebergView (hmsTable .getTTable ())) {
436+ if (MetaStoreUtils .isIcebergView (hmsTable .getTTable ())) {
437437 return false ;
438438 }
439439 Table table = IcebergTableUtil .getTable (conf , hmsTable .getTTable ());
@@ -899,7 +899,7 @@ public boolean supportsPartitionTransform() {
899899
900900 @ Override
901901 public List <TransformSpec > getPartitionTransformSpec (org .apache .hadoop .hive .ql .metadata .Table hmsTable ) {
902- if (BaseHiveIcebergMetaHook .isIcebergView (hmsTable .getTTable ())) {
902+ if (MetaStoreUtils .isIcebergView (hmsTable .getTTable ())) {
903903 return Collections .emptyList ();
904904 }
905905 Table table = IcebergTableUtil .getTable (conf , hmsTable .getTTable ());
@@ -916,7 +916,7 @@ public List<TransformSpec> getPartitionTransformSpec(org.apache.hadoop.hive.ql.m
916916 @ Override
917917 public Map <Integer , List <TransformSpec >> getPartitionTransformSpecs (
918918 org .apache .hadoop .hive .ql .metadata .Table hmsTable ) {
919- if (BaseHiveIcebergMetaHook .isIcebergView (hmsTable .getTTable ())) {
919+ if (MetaStoreUtils .isIcebergView (hmsTable .getTTable ())) {
920920 return Collections .emptyMap ();
921921 }
922922 Table table = IcebergTableUtil .getTable (conf , hmsTable .getTTable ());
@@ -1584,7 +1584,7 @@ public boolean supportsSortColumns() {
15841584
15851585 @ Override
15861586 public List <FieldSchema > sortColumns (org .apache .hadoop .hive .ql .metadata .Table hmsTable ) {
1587- if (BaseHiveIcebergMetaHook .isIcebergView (hmsTable .getTTable ())) {
1587+ if (MetaStoreUtils .isIcebergView (hmsTable .getTTable ())) {
15881588 return Collections .emptyList ();
15891589 }
15901590 TableDesc tableDesc = Utilities .getTableDesc (hmsTable );
@@ -2147,13 +2147,12 @@ public List<Partition> getPartitions(org.apache.hadoop.hive.ql.metadata.Table hm
21472147 }
21482148
21492149 public boolean isPartitioned (org .apache .hadoop .hive .ql .metadata .Table hmsTable ) {
2150- if (BaseHiveIcebergMetaHook .isIcebergView (hmsTable .getTTable ()) ||
2151- !MetaStoreUtils .isIcebergTable (hmsTable .getParameters ())) {
2152- return !hmsTable .getPartitionKeys ().isEmpty ();
2153- }
21542150 if (hmsTable .getMetaTable () != null || !hmsTable .getTTable ().isSetId ()) {
21552151 return false ;
21562152 }
2153+ if (MetaStoreUtils .lacksIcebergPartSpec (hmsTable .getTTable ())) {
2154+ return !hmsTable .getPartitionKeys ().isEmpty ();
2155+ }
21572156 Table table = IcebergTableUtil .getTable (conf , hmsTable .getTTable ());
21582157 Snapshot snapshot = IcebergTableUtil .getTableSnapshot (table , hmsTable );
21592158
@@ -2296,13 +2295,12 @@ public boolean canPerformMetadataDelete(org.apache.hadoop.hive.ql.metadata.Table
22962295
22972296 @ Override
22982297 public List <FieldSchema > getPartitionKeys (org .apache .hadoop .hive .ql .metadata .Table hmsTable ) {
2299- if (BaseHiveIcebergMetaHook .isIcebergView (hmsTable .getTTable ()) ||
2300- !MetaStoreUtils .isIcebergTable (hmsTable .getParameters ())) {
2301- return hmsTable .getPartitionKeys ();
2302- }
23032298 if (hmsTable .getMetaTable () != null || !hmsTable .getTTable ().isSetId ()) {
23042299 return Collections .emptyList ();
23052300 }
2301+ if (MetaStoreUtils .lacksIcebergPartSpec (hmsTable .getTTable ())) {
2302+ return hmsTable .getPartitionKeys ();
2303+ }
23062304 Table icebergTable = IcebergTableUtil .getTable (conf , hmsTable .getTTable ());
23072305 return MetastoreUtil .getPartitionKeys (icebergTable , icebergTable .spec ().specId ());
23082306 }
0 commit comments