@@ -4614,8 +4614,8 @@ public boolean delete_column_statistics_req(DeleteColumnStatisticsRequest req) t
46144614 ret = rawStore .deleteTableColumnStatistics (parsedDbName [CAT_NAME ], parsedDbName [DB_NAME ], tableName , colNames , engine );
46154615 if (ret ) {
46164616 eventType = EventType .DELETE_TABLE_COLUMN_STAT ;
4617- for (String colName :
4618- colNames == null ? table .getSd ().getCols ().stream ().map (FieldSchema ::getName ).toList () : colNames ) {
4617+ for (String colName : colNames == null || colNames . isEmpty () ?
4618+ table .getSd ().getCols ().stream ().map (FieldSchema ::getName ).toList () : colNames ) {
46194619 if (transactionalListeners != null && !transactionalListeners .isEmpty ()) {
46204620 MetaStoreListenerNotifier .notifyEvent (transactionalListeners , eventType ,
46214621 new DeleteTableColumnStatEvent (parsedDbName [CAT_NAME ], parsedDbName [DB_NAME ], tableName , colName , engine , this ));
@@ -4638,8 +4638,8 @@ public boolean delete_column_statistics_req(DeleteColumnStatisticsRequest req) t
46384638 partNames , colNames , engine );
46394639 if (ret ) {
46404640 eventType = EventType .DELETE_PARTITION_COLUMN_STAT ;
4641- for (String colName : colNames == null ? table . getSd (). getCols (). stream (). map ( FieldSchema :: getName )
4642- .toList () : colNames ) {
4641+ for (String colName : colNames == null || colNames . isEmpty () ?
4642+ table . getSd (). getCols (). stream (). map ( FieldSchema :: getName ) .toList () : colNames ) {
46434643 for (String partName : partNames ) {
46444644 List <String > partVals = getPartValsFromName (table , partName );
46454645 if (transactionalListeners != null && !transactionalListeners .isEmpty ()) {
0 commit comments