HIVE-29262: Incorrect column ordering output in case of different ordering of mutual columns in query & window function in vectorized PTF#6512
Conversation
62d8db8 to
ca4ac35
Compare
| LOAD DATA LOCAL INPATH '../../data/files/web_sales_2k' OVERWRITE INTO TABLE web_sales_txt; | ||
| select ws_bill_customer_sk,ws_item_sk from web_sales_txt; | ||
|
|
||
| SET hive.vectorized.execution.enabled; |
There was a problem hiding this comment.
Why is this line needed? hive.vectorized.execution.enabled is set to true on line 1.
| ws_sold_date_sk, | ||
| ws_sales_price, | ||
| LAG(ws_sales_price) OVER ( | ||
| PARTITION BY ws_item_sk,ws_bill_customer_sk |
There was a problem hiding this comment.
Please add a space between ws_item_sk,ws_bill_customer_sk
| SET hive.vectorized.execution.enabled=false; | ||
|
|
||
| SET hive.vectorized.execution.enabled; |
There was a problem hiding this comment.
This line seems unnecessary: SET hive.vectorized.execution.enabled;
| ORDER BY ws_sold_date_sk | ||
| ) AS sales_price_diff | ||
| FROM | ||
| web_sales_txt; |
There was a problem hiding this comment.
Can you add comments explaining what test case is being tested before this and other SELECT queries in this .q file?
There was a problem hiding this comment.
Yes, comments would be essential to explain this Qtest. Added comments to explain all the SELECT queries being run in the Qtest in commit: a5e3bfc
…ering of mutual columns in query & window function
ca4ac35 to
a5e3bfc
Compare
|



What changes were proposed in this pull request?
Reorder partition columns so they match the key input column sequence during Partitioned Table Function (PTF) execution
Why are the changes needed?
To ensure, the query column ordering is maintained in case of mutual columns in query and PTF having different ordering
Does this PR introduce any user-facing change?
Yes, the column ordering in the query now matches as the input column sequence provided by the user
How was this patch tested?
Manual Testing + added Qtest