gabotechs opened a new pull request, #15905:
URL: https://github.com/apache/datafusion/pull/15905

   ## 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.  
   -->
   
   Improve the way errors get shown to the developer while running 
sqllogictests.
   
   ## 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.
   -->
   
   - Canonicalizes the path of the file that contains an error in a 
sqllogictests, so that when reporting the error in the following format: 
`"{path}:{line_number}"` its clickable from IDEs, pointing directly to the 
exact line containing the failing test (verified on RustRover)
   - Runs all the sqllogictests in a single file even if some of them fail, 
reporting all failures, instead of just the first one.
   
   Example output after intentionally introducing 3 failures in aggregate.slt:
   Before:
   ```
   External error: query result mismatch:
   [SQL] select array_sort(c1), array_sort(c2) from (
     select array_agg(distinct column1) as c1, array_agg(distinct column2) 
ignore nulls as c2 from array_agg_distinct_list_table
   );
   [Diff] (-expected|+actual)
   -   [NULL, b, w] [[0, 1], [0, 1]]
   +   [NULL, b, w] [[0, 1], [1, 0]]
   at test_files/aggregate.slt:313
   ```
   After:
   ```
   Internal error: query result mismatch:
   [SQL] select array_sort(c1), array_sort(c2) from (
     select array_agg(distinct column1) as c1, array_agg(distinct column2) 
ignore nulls as c2 from array_agg_distinct_list_table
   );
   [Diff] (-expected|+actual)
   -   [NULL, b, w] [[0, 1], [0, 1]]
   +   [NULL, b, w] [[0, 1], [1, 0]]
   at 
/Users/foo/github/datafusion/datafusion/sqllogictest/test_files/aggregate.slt:313
   
   
   query result mismatch:
   [SQL] SELECT bit_or(c5), bit_or(c6), bit_or(c7), bit_or(c8), bit_or(c9) FROM 
aggregate_test_100
   [Diff] (-expected|+actual)
   -   -1 -1 255 65534 4294967295
   +   -1 -1 255 65535 4294967295
   at 
/Users/foo/github/datafusion/datafusion/sqllogictest/test_files/aggregate.slt:416
   
   
   statement is expected to fail with error:
        (regex) DataFusion error: Random failure
   but got error:
        DataFusion error: This feature is not implemented: VAR_POP(DISTINCT) 
aggregations are not available
   [SQL] SELECT var_pop(c2), var_pop(distinct c2) FROM aggregate_test_100
   at 
/Users/foo/github/datafusion/datafusion/sqllogictest/test_files/aggregate.slt:584
   ```
   
   ## 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)?
   -->
   
   These are changes to how the tests are reported, so I suppose?
   
   ## Are there any user-facing changes?
   
   No
   
   <!--
   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.
   -->
   


-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to