use of com.questdb.griffin.lexer.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testNotEqualPreferredColumn.
@Test
public void testNotEqualPreferredColumn() throws Exception {
IntrinsicModel m = modelOf("sym = null and sym != null and ex != 'blah'", "ex");
Assert.assertEquals(IntrinsicValue.UNDEFINED, m.intrinsicValue);
assertFilter(m, "'blah'ex!=nullsym!=nullsym=andand");
Assert.assertEquals("[]", m.keyValues.toString());
Assert.assertEquals("[]", m.keyValuePositions.toString());
}
use of com.questdb.griffin.lexer.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testIntervalSourceMin.
@Test
public void testIntervalSourceMin() throws Exception {
IntrinsicModel m = modelOf("timestamp = '2015-02-23T10:00:55.000Z;15s;15m;5'");
final String expected = "[{lo=2015-02-23T10:00:55.000000Z, hi=2015-02-23T10:01:10.000000Z}," + "{lo=2015-02-23T10:15:55.000000Z, hi=2015-02-23T10:16:10.000000Z}," + "{lo=2015-02-23T10:30:55.000000Z, hi=2015-02-23T10:31:10.000000Z}," + "{lo=2015-02-23T10:45:55.000000Z, hi=2015-02-23T10:46:10.000000Z}," + "{lo=2015-02-23T11:00:55.000000Z, hi=2015-02-23T11:01:10.000000Z}]";
TestUtils.assertEquals(expected, intervalToString(m.intervals));
}
use of com.questdb.griffin.lexer.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testSimpleLambda.
@Test
public void testSimpleLambda() throws Exception {
IntrinsicModel m = modelOf("sym in (`xyz`)");
TestUtils.assertEquals("xyz", m.keyValues.get(0));
Assert.assertTrue(m.keyValuesIsLambda);
}
use of com.questdb.griffin.lexer.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testNotInIntervalIntersect.
@Test
public void testNotInIntervalIntersect() throws Exception {
IntrinsicModel m = modelOf("not (timestamp in ('2015-05-11T15:00:00.000Z', '2015-05-11T20:00:00.000Z')) and timestamp = '2015-05-11'");
Assert.assertEquals(IntrinsicValue.UNDEFINED, m.intrinsicValue);
TestUtils.assertEquals("[{lo=2015-05-11T00:00:00.000000Z, hi=2015-05-11T14:59:59.999999Z},{lo=2015-05-11T20:00:00.000001Z, hi=2015-05-11T23:59:59.999999Z}]", intervalToString(m.intervals));
Assert.assertNull(m.filter);
}
use of com.questdb.griffin.lexer.model.IntrinsicModel in project questdb by bluestreak01.
the class QueryFilterAnalyserTest method testDubiousLess.
@Test
public void testDubiousLess() throws Exception {
IntrinsicModel m = modelOf("ts < ts");
Assert.assertEquals(IntrinsicValue.FALSE, m.intrinsicValue);
}
Aggregations