asof join returns empty for unmatched partitioned data

16 Views Asked by At

The aj function can only match values from the right table that are in the same partition as the left table. For example, if the column “time“ is partitioned by month and there is no data for May in the right table, the aj result is empty as shown below. enter image description here

However, this issue does not occur with in-memory tables, as shown in the following figure. enter image description here

1

There are 1 best solutions below

0
dbaa9948 On

If either the left table or the right table is a partitioned table, The joining columns except the last one must include all of the partitioning columns of the partitioned table. So it is recommended to read the partitioned table into an in-memory table before joining.