simhadri-g commented on code in PR #4228:
URL: https://github.com/apache/hive/pull/4228#discussion_r1192213156


##########
iceberg/iceberg-handler/src/test/results/positive/col_stats.q.out:
##########
@@ -339,17 +339,16 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@tbl_ice_puffin
 col_name               a                   
 data_type              int                 
-min                    1                   
-max                    333                 
-num_nulls              0                   
-distinct_count         7                   
+min                                        
+max                                        
+num_nulls                                  
+distinct_count                             

Review Comment:
   This part of the output corresponds to the following code snippet.
   
   ```
   set hive.iceberg.stats.source=iceberg;
   drop table if exists tbl_ice_puffin;
   create external table tbl_ice_puffin(a int, b string, c int) stored by 
iceberg tblproperties ('format-version'='2');
   insert into tbl_ice_puffin values (1, 'one', 50), (2, 'two', 51),(2, 'two', 
51),(2, 'two', 51), (3, 'three', 52), (4, 'four', 53), (5, 'five', 54), (111, 
'one', 55), (333, 'two', 56);
   explain select * from tbl_ice_puffin order by a, b, c;
   select * from tbl_ice_puffin order by a, b, c;
   select count(*) from tbl_ice_puffin ;
   desc formatted tbl_ice_puffin a;
   ```
   
   In this case, the output of `desc formatted tbl_ice_puffin a; ` is accurate 
and not stale.  
   (min = 1, max=333.)
   
   I think we should either:
   1. Source the stats for desc table from puffin files for iceberg tables or.
   2. Add additional logic in hms to address this.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to