github-actions[bot] commented on code in PR #64624:
URL: https://github.com/apache/doris/pull/64624#discussion_r3470731511
##########
regression-test/suites/query_p0/aggregate/support_type/percentile_ap/percentile_approx.groovy:
##########
@@ -68,4 +68,15 @@ suite("percentile_approx") {
qt_percentile_approx_largeint """select percentile_approx(col_largeint,
0.5) from d_table;"""
qt_percentile_approx_float """select percentile_approx(col_float, 0.5)
from d_table;"""
qt_percentile_approx_double """select percentile_approx(col_double, 0.5)
from d_table;"""
-}
\ No newline at end of file
+
+ test {
+ sql """select percentile_approx(col_double, -0.1) from d_table;"""
+ exception "percentile_approx quantile must be in [0, 1]"
+ }
+ test {
+ sql """select percentile_approx(col_double, 1.1) from d_table;"""
+ exception "percentile_approx quantile must be in [0, 1]"
+ }
+ qt_percentile_approx_compression_low """select
percentile_approx(col_double, 0.5, 2047) from d_table;"""
Review Comment:
These new result-producing `qt_` cases need generated expected-output
entries. The PR adds `qt_percentile_approx_compression_low` and
`qt_percentile_approx_compression_high`, but
`regression-test/data/query_p0/aggregate/support_type/percentile_ap/percentile_approx.out`
is not updated and currently contains no sections for those labels. When this
suite runs, the regression framework will compare against missing/stale
expected output rather than the new query results. Please regenerate and
include the `.out` file, or convert these to `test { ... exception ... }` cases
if the intended behavior is rejection.
##########
regression-test/suites/query_p0/aggregate/support_type/percentile_ap_w/percentile_approx_weighted.groovy:
##########
@@ -63,4 +63,15 @@ suite("percentile_approx_weighted") {
"""
qt_percentile_approx_weighted_double """select
percentile_approx_weighted(col_double, col_float, 0.5) from d_table;"""
-}
\ No newline at end of file
+ qt_percentile_approx_weighted_compression_low """select
percentile_approx_weighted(col_double, col_float, 0.5, 2047) from d_table;"""
Review Comment:
These new result-producing `qt_` cases also need generated expected-output
entries.
`regression-test/data/query_p0/aggregate/support_type/percentile_ap_w/percentile_approx_weighted.out`
is not updated and has no `qt_percentile_approx_weighted_compression_low/high`
sections, so the suite will not have the expected results for these added
checks. Please regenerate and include the `.out` file, or make them explicit
exception tests if rejection is intended.
##########
regression-test/suites/query_p0/sql_functions/aggregate_functions/test_aggregate_all_functions.groovy:
##########
@@ -354,16 +359,41 @@ suite("test_aggregate_all_functions", "arrow_flight_sql")
{
qt_select28 "select id,PERCENTILE_APPROX(level,0.805,2048) from
${tableName_14} group by id order by id"
qt_select28_1 "select id,PERCENTILE_APPROX(level, null ,2048) from
${tableName_14} group by id order by id"
+ test {
+ sql "select PERCENTILE_APPROX(level, id) from ${tableName_14}"
+ exception "percentile_approx requires second parameter must be a
constant"
+ }
+
+ test {
+ sql "select PERCENTILE_APPROX(level, 0.5, id) from ${tableName_14}"
+ exception "percentile_approx requires the third parameter must be a
constant"
+ }
+
try {
sql "select id,PERCENTILE_APPROX(level, -1, 2048) from ${tableName_14}
group by id order by id"
} catch (Exception ex) {
assert("${ex}".contains("-1"))
}
+ try {
Review Comment:
Please make these negative checks fail when the query unexpectedly succeeds.
As written, the `try` block only asserts inside `catch`; if this SQL starts
succeeding, the test just continues and the regression still passes. The repo
test standard also asks expected errors to use `test { sql ...; exception ...
}`, which would make the failure mode explicit.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]