xuzifu666 commented on code in PR #4227:
URL: https://github.com/apache/calcite/pull/4227#discussion_r1984537665
##########
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:
@asolimando OK,I had test the result from Oracle,the result like follow
which keep the same with Druid:
select COT(10) from test_db.new_table nt ORDER BY id limit 1;
1.5423510453569202
select ASIN(0.1) from test_db.new_table nt ORDER BY id limit 1;
0.1001674211615598
select ACOS(0.1) from test_db.new_table nt ORDER BY id limit 1;
1.4706289056333368
select ATAN(10) from test_db.new_table nt ORDER BY id limit 1;
1.4711276743037347
select ATAN2(10, 20) from test_db.new_table nt ORDER BY id limit 1;
0.4636476090008061
select DEGREES(10) from test_db.new_table nt ORDER BY id limit 1;
572.9577951308232
--
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]