kasakrisz commented on PR #4869: URL: https://github.com/apache/hive/pull/4869#issuecomment-1823874183
@deniskuzZ I revisited your proposal and found that `NOT(ISNULL($3)) AND <=($3, NULL)` is actually always simplified to `<=($3, NULL)` at Filter operator creation becasue $3 is a referenc to SnapshotID virtual column which type is `bigint not null`. I also checked that we don't need an incremental MV rebuild when any of the base tables was empty when the MV was last rebuilt because when the MV definition has * only one base table and that has new records inserted it actually means that all records are new and a full scan is needed. * join. It is always inner join (only this join type is supported by the rewrite algorithm) hence we need full scan on all tables and a full rebuild because those new records must be joined with the records coming from the other table. mv_iceberg_orc.q tests this scenario. In this case the augmented plan has a filter with a predicate `<=($3, NULL)` on top of the previously empty table and the rewrite doesn't happen and we fall back to full rebuild which is expected. -- 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]
