ch-sc commented on PR #14523: URL: https://github.com/apache/datafusion/pull/14523#issuecomment-2660141218
> I took a quick look, and you can use the union logic there I thought a bit more about the union logic and came up with another solution. Sometimes intervals are not overlapping and sometimes have no bound in one direction (`NULL`). Typically the union of non-overlapping intervals would result in a set of intervals, but there is no support of this. Here are some examples of what I think should be correct, without interval sets support: ``` [1, 2] ∪ [3,4] = [1,4] [1, NULL] ∪ [NULL, NULL] = [1, NULL] [NULL, 1] ∪ [NULL, NULL] = [NULL, 1] [3, NULL] ∪ [NULL, 1] = [NULL, NULL] [5, NULL] ∪ [1, 2] = [1, NULL] ``` I adapted the union logic accordingly and added tests. Happy for your feedback! -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org