Commit 98defe6
authored
chore: Fix all sqllogictest dangling configs (#21108)
## 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.
-->
Follow up to #20838
## 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.
-->
in #20838 it adds a way to check and warn about dangling config
settings, it has detected several existing violations but has not fixed
them:
```sh
yongting@Yongtings-MacBook-Pro-2 ~/C/datafusion (cleanup-slt)> git checkout main
Switched to branch 'main'
Your branch is up to date with 'upstream/main'.
yongting@Yongtings-MacBook-Pro-2 ~/C/datafusion (main=)> cargo test --profile=ci --test sqllogictests
Compiling datafusion-sqllogictest v52.3.0 (/Users/yongting/Code/datafusion/datafusion/sqllogictest)
Finished `ci` profile [unoptimized] target(s) in 2.09s
Running bin/sqllogictests.rs (target/ci/deps/sqllogictests-7e2a8cc6115b158a)
Running with 14 test threads (available parallelism: 14)
SLT file aggregate_repartition.slt left modified configuration
datafusion.execution.target_partitions: 4 -> 1
SLT file arrow_files.slt left modified configuration
datafusion.sql_parser.map_string_types_to_utf8view: true -> false
SLT file datetime/current_date_timezone.slt left modified configuration
datafusion.execution.time_zone: NULL -> +00:00
...
```
This PR does
1. Fix all the old violations
2. For future slt dangling configurations, it fails the test run instead
of only warn about it.
I tested to add a config statement at the end of one `slt` file, and run
the test, it runs and failed as expected
```sh
yongting@Yongtings-MacBook-Pro-2 ~/C/datafusion (cleanup-slt)> cargo test --profile=ci --test sqllogictests
Compiling datafusion-sqllogictest v52.3.0 (/Users/yongting/Code/datafusion/datafusion/sqllogictest)
Finished `ci` profile [unoptimized] target(s) in 2.28s
Running bin/sqllogictests.rs (target/ci/deps/sqllogictests-7e2a8cc6115b158a)
Running with 14 test threads (available parallelism: 14)
Completed 416 test files in 5 seconds
External error: Other Error: SLT file sort_pushdown.slt left modified configuration
datafusion.optimizer.max_passes: 3 -> 10
Error: Execution("1 failures")
error: test failed, to rerun pass `-p datafusion-sqllogictest --test 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.
-->
## 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
4. 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)?
-->
UT
## 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.
-->
no1 parent 7f29cb0 commit 98defe6
File tree
58 files changed
+645
-65
lines changed- datafusion/sqllogictest
- bin
- src/engines/datafusion_engine
- test_files
- datetime
- string
- tpch
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
58 files changed
+645
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
| |||
482 | 495 | | |
483 | 496 | | |
484 | 497 | | |
485 | | - | |
| 498 | + | |
486 | 499 | | |
487 | 500 | | |
488 | 501 | | |
| |||
512 | 525 | | |
513 | 526 | | |
514 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
515 | 533 | | |
516 | 534 | | |
517 | 535 | | |
518 | 536 | | |
519 | 537 | | |
520 | 538 | | |
521 | | - | |
| 539 | + | |
| 540 | + | |
522 | 541 | | |
523 | 542 | | |
524 | 543 | | |
525 | 544 | | |
526 | 545 | | |
527 | | - | |
| 546 | + | |
528 | 547 | | |
529 | | - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
530 | 554 | | |
531 | 555 | | |
532 | 556 | | |
533 | 557 | | |
534 | | - | |
| 558 | + | |
535 | 559 | | |
536 | 560 | | |
537 | 561 | | |
| |||
644 | 668 | | |
645 | 669 | | |
646 | 670 | | |
647 | | - | |
| 671 | + | |
648 | 672 | | |
649 | 673 | | |
650 | 674 | | |
| |||
688 | 712 | | |
689 | 713 | | |
690 | 714 | | |
| 715 | + | |
691 | 716 | | |
692 | 717 | | |
693 | 718 | | |
694 | 719 | | |
695 | 720 | | |
696 | 721 | | |
697 | | - | |
| 722 | + | |
| 723 | + | |
698 | 724 | | |
699 | 725 | | |
700 | 726 | | |
| |||
712 | 738 | | |
713 | 739 | | |
714 | 740 | | |
715 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
716 | 744 | | |
717 | 745 | | |
718 | 746 | | |
| |||
Lines changed: 82 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| |||
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
91 | 138 | | |
92 | 139 | | |
93 | 140 | | |
| |||
142 | 189 | | |
143 | 190 | | |
144 | 191 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
187 | 198 | | |
188 | 199 | | |
189 | 200 | | |
| |||
209 | 220 | | |
210 | 221 | | |
211 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8778 | 8778 | | |
8779 | 8779 | | |
8780 | 8780 | | |
8781 | | - | |
8782 | | - | |
| 8781 | + | |
8783 | 8782 | | |
8784 | | - | |
| 8783 | + | |
| 8784 | + | |
8785 | 8785 | | |
8786 | 8786 | | |
| 8787 | + | |
| 8788 | + | |
| 8789 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
219 | 234 | | |
220 | 235 | | |
221 | 236 | | |
| |||
693 | 708 | | |
694 | 709 | | |
695 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
696 | 726 | | |
697 | 727 | | |
698 | 728 | | |
| |||
738 | 768 | | |
739 | 769 | | |
740 | 770 | | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
741 | 786 | | |
742 | 787 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
0 commit comments