asolimando commented on code in PR #4227:
URL: https://github.com/apache/calcite/pull/4227#discussion_r1984522184
##########
druid/src/test/java/org/apache/calcite/test/DruidAdapterIT.java:
##########
@@ -3969,6 +3969,30 @@ private void testCountWithApproxDistinct(boolean approx,
String sql, String expe
+ "filter=[AND(>(SIN($91), 0.9129452507276277E0), >(COS($90),
0.40808206181339196E0), =(FLOOR(TAN($91)), 2.0E0), "
+ "<(ABS(-(TAN($91), /(SIN($91), COS($91)))), 1.0E-6))], "
+ "groups=[{}], aggs=[[COUNT()]])");
+
+ final String sql1 = "SELECT COUNT(*) FROM " + FOODMART_TABLE + " WHERE "
+ + "COT(\"store_cost\") > COT(20) AND ASIN(\"store_sales\") > ASIN(1) "
+ + "AND FLOOR(ACOS(\"store_cost\")) = 2 "
+ + "AND ABS(ATAN(\"store_cost\") - ATAN(\"store_cost\") /
ATAN(\"store_cost\")) < 10e-7";
+ sql(sql1, FOODMART)
+ .returnsOrdered("EXPR$0=0")
+ .explainContains("PLAN=EnumerableInterpreter\n"
+ + " DruidQuery(table=[[foodmart, foodmart]], "
+ +
"intervals=[[1900-01-09T00:00:00.000Z/2992-01-10T00:00:00.000Z]], "
+ + "filter=[AND(>(COT($91), 0.4469951089489167E0), >(ASIN($90),
1.5707963267948966E0), =(FLOOR(ACOS($91)), 2.0E0), "
+ + "<(ABS(-(ATAN($91), /(ATAN($91), ATAN($91)))), 1.0E-6))], "
+ + "groups=[{}], aggs=[[COUNT()]])");
+
+ final String sql2 = "SELECT COUNT(*) FROM " + FOODMART_TABLE + " WHERE "
+ + "FLOOR(ATAN2(\"store_cost\", \"store_cost\")) = 2 ";
+ sql(sql2, FOODMART)
+ .returnsOrdered("EXPR$0=0")
Review Comment:
I guess the question is about the results, not the test, something like
comparing the result here with the output of a few major DBs like postgres or
Oracle, could you do that and share @xuzifu666 please?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]