yiqijiu commented on PR #5556:
URL: https://github.com/apache/hive/pull/5556#issuecomment-2505956041

   > LGTM with nits
   > 
   > Could we add a qfile test to ensure that we update Statistics safely 
against extreme values? For example, I checked your patch using the following 
query. It could be useful for someone else if you share the problematic query 
you found. If it's not possible, I think the patch could be merged as is.
   > ```
   > create table table1 (key1 int);
   > create table table2 (key2 int);
   > 
   > alter table table1 update statistics set('numRows'='9223372036854775807', 
'rawDataSize'='9223372036854775807');
   > alter table table2 update statistics set('numRows'='9223372036854775807', 
'rawDataSize'='9223372036854775807');
   > 
   > explain
   > select * from (
   >   select key1 key from table1
   >   union all
   >   select key2 key from table2
   > ) x order by key;
   > ```
   The issue I encountered occurs when there are more than four window 
functions in a Hive query, and the table and fields are very large. In such 
cases, the "width is negative" error can arise. I am not sure if this 
modification can fix the problem. However, when reviewing the source code, I 
noticed an overflow issue in this area, so I made the changes accordingly. 
Thank you for your feedback. Currently, I am not sure how to write a test case 
for this scenario in Hive.
   Could you please guide me on which test class I can refer to for writing 
related test cases?
   
   
   
   


-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to