use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testInVsEqualInterval.
@Test
public void testInVsEqualInterval() throws Exception {
IntrinsicModel m = modelOf("timestamp in ('2014-01-01T12:30:00.000Z', '2014-01-02T12:30:00.000Z') and timestamp = '2014-01-01'");
Assert.assertNull(m.filter);
Assert.assertEquals("[Interval{lo=2014-01-01T12:30:00.000Z, hi=2014-01-01T23:59:59.999Z}]", IntervalCompiler.asIntervalStr(m.intervals));
}
use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testMultipleAnds.
@Test
public void testMultipleAnds() throws Exception {
IntrinsicModel m = modelOf("a > 10 and b > 20 and (c > 100 and d < 20 and bid = 30)");
assertFilter(m, "30bid=20d<100c>andand20b>10a>andand");
}
use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testTwoIntervals.
@Test
public void testTwoIntervals() throws Exception {
IntrinsicModel m = modelOf("bid > 100 and timestamp in (\"2014-01-01T12:30:00.000Z\", \"2014-01-02T12:30:00.000Z\") and timestamp in (\"2014-01-01T16:30:00.000Z\", \"2014-01-05T12:30:00.000Z\")");
Assert.assertEquals("[Interval{lo=2014-01-01T16:30:00.000Z, hi=2014-01-02T12:30:00.000Z}]", IntervalCompiler.asIntervalStr(m.intervals));
}
use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testTwoIntervalSources.
@Test
public void testTwoIntervalSources() throws Exception {
IntrinsicModel m = modelOf("timestamp = '2014-06-20T13:25:00.000Z;10m;2d;5' and timestamp = '2015-06-20T13:25:00.000Z;10m;2d;5'");
Assert.assertEquals("[]", IntervalCompiler.asIntervalStr(m.intervals));
}
use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testEqualsZeroOverlapWithIn.
@Test
public void testEqualsZeroOverlapWithIn() throws Exception {
IntrinsicModel m = modelOf("sym in ('x','y') and sym = 'z'");
Assert.assertEquals(IntrinsicValue.FALSE, m.intrinsicValue);
}
Aggregations