In this case j1,j2 are views created on top of parquet files, BOTH views have order by on multiple columns in different order with nulls first/last.
Also, table in in view j1, consists of 99 parquet files. See attached views.txt file on how to create views (make sure to create views in a different workspace, views have the same names as tables)
The same can be reproduced with parquet files and subqueries:
(pay attention parquet files are named the same as views: j1, j2)
You do need to have sort in order to reproduce the problem.
This query works:
I'm sure there is an easier way to reproduce this failure, can't think about it right now. Please talk to me if you have trouble reproducing this failure. Issue with the "maybe" redundant sort will be addressed in a different bug.