metatron-app / metatron-discovery

Powerful & Easy way for big data discovery
https://metatron.app
Apache License 2.0
442 stars 112 forks source link

Fix project reduce expression rule not handling sarg expressions #4287

Open navis opened 1 year ago

navis commented 1 year ago

like CalciteQueryTest.testFilteredTimeAggregators

ref = "$0"
r0 = "[(-∞‥2000-02-01 00:00:00)]"
predicates =  size = 2
 0 = ">=($0, 2000-01-01 00:00:00)"
 1 = "<($0, 2001-02-01 00:00:00)"
clazz = "interface java.lang.Comparable"
result = "[[2000-01-01 00:00:00‥2000-02-01 00:00:00)]"
predicate = "<($0, 2001-02-01 00:00:00)"
call = "<($0, 2001-02-01 00:00:00)"
comparison
c1 = "2001-02-01 00:00:00"
r1 = "(-∞‥2001-02-01 00:00:00)"