61yao commented on code in PR #9811: URL: https://github.com/apache/pinot/pull/9811#discussion_r1026091650
########## pinot-query-runtime/src/test/resources/queries/Aggregates.json: ########## @@ -0,0 +1,295 @@ +{ + "general_aggregate": { + "tables": { + "tbl": { + "schema": [ + { + "name": "int_col", + "type": "INT" + }, + { + "name": "double_col", + "type": "DOUBLE" + }, + { + "name": "string_col", + "type": "STRING" + } + ], + "inputs": [ Review Comment: Yeah. I started like that but the auto formatter changed for me. How about I auto format after you add a rule? ########## pinot-query-runtime/src/test/resources/queries/Aggregates.json: ########## @@ -0,0 +1,295 @@ +{ + "general_aggregate": { + "tables": { + "tbl": { + "schema": [ + { + "name": "int_col", + "type": "INT" + }, + { + "name": "double_col", + "type": "DOUBLE" + }, + { + "name": "string_col", + "type": "STRING" + } + ], + "inputs": [ + [ + 2, + 300, + "a" + ], + [ + 2, + 400, + "a" + ], + [ + 3, + 100, + "b" + ], + [ + 100, + 1, + "b" + ], + [ + 101, + 1.01, + "c" + ], + [ + 150, + 1.5, + "c" + ], + [ + 175, + 1.75, + "c" + ] + ] + } + }, + "queries": [ + { + "psql": "4.2.7", + "ignored": true, + "comments": "result error:average doesn't work because we round up but h2 round down for integer", + "description": "average int", + "sql": "SELECT avg(int_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "average double", + "sql": "SELECT avg(double_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "average double with filter", + "sql": "SELECT avg(double_col) FROM {tbl} WHERE double_col >= 100" + }, + { + "psql": "4.2.7", + "description": "sum double", + "sql": "SELECT sum(double_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "sum int", + "sql": "SELECT sum(int_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "max double", + "sql": "SELECT max(double_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "max int", + "sql": "SELECT max(int_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "count int", + "sql": "SELECT count(int_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "count double", + "sql": "SELECT count(double_col) FROM {tbl}" + }, + { + "psql": "4.2.7", + "description": "count, sum group by order by", + "sql": "select string_col, count(int_col), sum(double_col) from {tbl} group by string_col order by string_col;" + }, + { + "psql": "4.2.7", + "ignored": true, + "comments": "parse error", Review Comment: Added -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org