This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-24025-b9022565e294072d7bca039f743b1cacdf10dee1
in repository https://gitbox.apache.org/repos/asf/datafusion.git

commit f3a895ffb2c26c32532cead6a597684e4b8857e7
Author: Yongting You <[email protected]>
AuthorDate: Sun Aug 2 14:06:41 2026 +0800

    minor: Add `slt` test for nullable window retract  (#24025)
    
    ## Which issue does this PR close?
    
    <!--
    We generally require a GitHub issue to be filed for all bug fixes and
    enhancements and this helps us generate change logs for our releases.
    You can link an issue to this PR using the GitHub syntax. For example
    `Closes #123` indicates that this PR will close issue #123.
    -->
    
    - Closes #.
    
    ## Rationale for this change
    
    <!--
    Why are you proposing this change? If this is already explained clearly
    in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand
    your changes and offer better suggestions for fixes.
    -->
    When browsing a recent PR
    https://github.com/apache/datafusion/pull/23954, I found the there are
    two corner cases missing test coverage in the codecov report. This PR
    adds sql tests for them (test result verified with DuckDB)
    
    Missing coverage:
    
    
https://app.codecov.io/gh/apache/datafusion/pull/23954?src=pr&el=tree&filepath=datafusion%2Ffunctions-aggregate%2Fsrc%2Fpercentile_cont.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#1935ab8f13c9459b071f56115e8527ed-R462
    
    
https://app.codecov.io/gh/apache/datafusion/pull/23954?src=pr&el=tree&filepath=datafusion%2Ffunctions-aggregate%2Fsrc%2Fmedian.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#7cad0cf744d908e2045a5f6c8b6cdf5e-R324
    
    ## What changes are included in this PR?
    
    <!--
    There is no need to duplicate the description in the issue here but it
    is sometimes worth providing a summary of the individual changes in this
    PR.
    -->
    
    ## Are these changes tested?
    
    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code
    
    If tests are not included in your PR, please explain why (for example,
    are they covered by existing tests)?
    -->
    
    ## Are there any user-facing changes?
    
    <!--
    If there are user-facing changes then we may require documentation to be
    updated before approving the PR.
    -->
    
    <!--
    If there are any breaking changes to public APIs, please add the `api
    change` label.
    -->
---
 datafusion/sqllogictest/test_files/window.slt | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/datafusion/sqllogictest/test_files/window.slt 
b/datafusion/sqllogictest/test_files/window.slt
index fd477a3386..59cc4a7c46 100644
--- a/datafusion/sqllogictest/test_files/window.slt
+++ b/datafusion/sqllogictest/test_files/window.slt
@@ -6843,16 +6843,17 @@ DROP TABLE issue_20194_t1;
 statement ok
 DROP TABLE issue_20194_t2;
 
-# Sliding-window MIN/MAX over a frame whose non-NULL values have all been
-# retracted should yield NULL.
-query IIII
+# Sliding-window over a frame whose non-NULL values have all been retracted 
should yield NULL.
+query IIIIRR
 SELECT id, x,
        MIN(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS 
min_x,
-       MAX(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS 
max_x
+       MAX(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS 
max_x,
+       percentile_cont(x, 0.5) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND 
CURRENT ROW) AS percentile_x,
+       median(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) 
AS median_x,
 FROM (VALUES (1, 3), (2, NULL), (3, NULL), (4, 7)) t(id, x)
 ORDER BY id
 ----
-1 3 3 3
-2 NULL 3 3
-3 NULL NULL NULL
-4 7 7 7
+1 3 3 3 3 3
+2 NULL 3 3 3 3
+3 NULL NULL NULL NULL NULL
+4 7 7 7 7 7
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to