use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testIntervalGreaterOrEq2.
@Test
public void testIntervalGreaterOrEq2() throws Exception {
IntrinsicModel m = modelOf("timestamp >= '2014-01-01T15:30:00.000Z' and timestamp in ('2014-01-01T12:30:00.000Z', '2014-01-02T12:30:00.000Z')");
Assert.assertEquals("[Interval{lo=2014-01-01T15: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 testThreeIntrinsics.
@Test
public void testThreeIntrinsics() throws Exception {
IntrinsicModel m;
m = modelOf("sym in ('a', 'b') and ex in ('c') and timestamp in ('2014-01-01T12:30:00.000Z', '2014-01-02T12:30:00.000Z') and bid > 100 and ask < 110");
assertFilter(m, "110ask<100bid>'c'exinandand");
Assert.assertEquals("sym", m.keyColumn);
Assert.assertEquals("[a,b]", m.keyValues.toString());
Assert.assertEquals("[Interval{lo=2014-01-01T12: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 testDubiousNotEquals.
@Test
public void testDubiousNotEquals() throws Exception {
IntrinsicModel m = modelOf("ts != ts");
Assert.assertEquals(IntrinsicValue.FALSE, m.intrinsicValue);
}
use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testExactDate.
@Test
public void testExactDate() throws Exception {
IntrinsicModel m = modelOf("timestamp = '2015-05-10T15:03:10.000Z' and timestamp < '2015-05-11T08:00:55.000Z'");
Assert.assertEquals("[Interval{lo=2015-05-10T15:03:10.000Z, hi=2015-05-10T15:03:10.000Z}]", IntervalCompiler.asIntervalStr(m.intervals));
Assert.assertNull(m.filter);
}
use of com.questdb.parser.sql.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testInNull.
@Test
public void testInNull() throws Exception {
IntrinsicModel m = modelOf("sym in ('X', null, 'Y')");
Assert.assertEquals("sym", m.keyColumn);
Assert.assertEquals("[X,null,Y]", m.keyValues.toString());
}
Aggregations