You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "korowa (via GitHub)" <gi...@apache.org> on 2023/01/25 16:27:20 UTC

[GitHub] [arrow-datafusion] korowa commented on a diff in pull request #5055: Minor: Move some aggregate error tests to sqllogictests

korowa commented on code in PR #5055:
URL: https://github.com/apache/arrow-datafusion/pull/5055#discussion_r1086856767


##########
datafusion/core/tests/sqllogictests/test_files/aggregate.slt:
##########
@@ -36,6 +36,53 @@ STORED AS CSV
 WITH HEADER ROW
 LOCATION '../../testing/data/csv/aggregate_test_100.csv'
 
+#######
+# Error tests
+#######
+
+# https://github.com/apache/arrow-datafusion/issues/3353
+statement error Aggregations require unique expression names
+SELECT approx_distinct(c9) count_c9, approx_distinct(cast(c9 as varchar)) count_c9_str FROM aggregate_test_100
+
+# csv_query_approx_percentile_cont_with_weight()
+statement error Error during planning: The function ApproxPercentileContWithWeight does not support inputs of type Utf8.
+SELECT approx_percentile_cont_with_weight(c1, c2, 0.95) FROM aggregate_test_100
+
+statement error  Error during planning: The weight argument for ApproxPercentileContWithWeight does not support inputs of type Utf8
+SELECT approx_percentile_cont_with_weight(c3, c1, 0.95) FROM aggregate_test_100
+
+statement error Error during planning: The percentile argument for ApproxPercentileContWithWeight must be Float64, not Utf8
+SELECT approx_percentile_cont_with_weight(c3, c2, c1) FROM aggregate_test_100
+
+
+# csv_query_approx_percentile_cont_with_weight

Review Comment:
   Looks like duplicated block, except double spaces on [line 51](https://github.com/apache/arrow-datafusion/pull/5055/files#diff-d44e3605231ebbdef511cc254b4fe6d6d84af632275e98daefc155e3db0181efR51) and dot in the end of [line 48](https://github.com/apache/arrow-datafusion/pull/5055/files#diff-d44e3605231ebbdef511cc254b4fe6d6d84af632275e98daefc155e3db0181efR48)



##########
datafusion/core/tests/sqllogictests/test_files/aggregate.slt:
##########
@@ -36,6 +36,53 @@ STORED AS CSV
 WITH HEADER ROW
 LOCATION '../../testing/data/csv/aggregate_test_100.csv'
 
+#######
+# Error tests
+#######
+
+# https://github.com/apache/arrow-datafusion/issues/3353
+statement error Aggregations require unique expression names
+SELECT approx_distinct(c9) count_c9, approx_distinct(cast(c9 as varchar)) count_c9_str FROM aggregate_test_100
+
+# csv_query_approx_percentile_cont_with_weight()
+statement error Error during planning: The function ApproxPercentileContWithWeight does not support inputs of type Utf8.
+SELECT approx_percentile_cont_with_weight(c1, c2, 0.95) FROM aggregate_test_100
+
+statement error  Error during planning: The weight argument for ApproxPercentileContWithWeight does not support inputs of type Utf8
+SELECT approx_percentile_cont_with_weight(c3, c1, 0.95) FROM aggregate_test_100
+
+statement error Error during planning: The percentile argument for ApproxPercentileContWithWeight must be Float64, not Utf8
+SELECT approx_percentile_cont_with_weight(c3, c2, c1) FROM aggregate_test_100
+
+
+# csv_query_approx_percentile_cont_with_weight

Review Comment:
   And it also seems each of these 3 error messages should end with dot, though sqllogictests completely  ignores actual error message - even
   ```
   statement error just some random text here
   SELECT approx_percentile_cont_with_weight(c1, c2, 0.95) FROM aggregate_test_100
   ```
   counts as passed test 🤔 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org