yuqi1129 commented on pull request #902: URL: https://github.com/apache/incubator-iotdb/pull/902#issuecomment-691814857
@Test public void testFilter7() { CalciteAssert.that() .with(MODEL) .with("UnQuotedCasing", IoTDBConstant.UnQuotedCasing) .query("select * from \"root.vehicle\" " + "where (device = 'root.vehicle.d0' AND \"time\" <= 1) OR s2 = 2.22 and 1 = 1") .returns("time=1; device=root.vehicle.d0; s0=101; s1=1101; s2=null; s3=null; s4=null\n" + "time=2; device=root.vehicle.d0; s0=10000; s1=40000; s2=2.22; s3=null; s4=null\n" + "time=2222; device=root.vehicle.d1; s0=null; s1=null; s2=2.22; s3=null; s4=null\n") .explainContains("PLAN=IoTDBToEnumerableConverter\n" + " IoTDBFilter(condition=[OR(AND(=($1, 'root.vehicle.d0'), <=($0, 1)), =(CAST($4):DOUBLE NOT NULL, 2.22))])\n" + " IoTDBTableScan(table=[[IoTDBSchema, root.vehicle]])"); } Should add rules to reduce constant value like where 1 = 1 and a = 1 should be folded as where a = 1, see above ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org