Commit 9c3c01a
authored
refactor: Improve
## 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 #20815.
## Rationale for this change
This is follow-up PR for
#20371.
Similarly to `SessionContext::parse_capacity_limit` API,
`SessionContext::parse_duration` API also needs to have following
improvements:
1. Validation for empty or blank duration values:
```
SET datafusion.runtime.list_files_cache_ttl = ' '
Current:
DataFusion error: Error during planning: Failed to parse number from duration ' '
New:
DataFusion error: Error during planning: Duration should not be empty or blank for 'datafusion.runtime.list_files_cache_ttl'
```
2. Exposing config name in error messages,
3. Comprehensive test coverage for invalid durations,
4. Updating `datafusion.runtime.list_files_cache_ttl` documentation for
other allowed settings.
## What changes are included in this PR?
Explained in the first section.
## Are these changes tested?
Yes, being extended existing test cases.
## Are there any user-facing changes?
Yes, config name has been added to error message when the validation is
failed.SessionContext::parse_duration API (#20816)1 parent 2c871b2 commit 9c3c01a
File tree
3 files changed
+142
-13
lines changed- datafusion
- core/src/execution/context
- sqllogictest/test_files
- docs/source/library-user-guide/upgrading
3 files changed
+142
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
| 1187 | + | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| |||
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
1326 | | - | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1327 | 1333 | | |
1328 | 1334 | | |
1329 | 1335 | | |
1330 | 1336 | | |
1331 | 1337 | | |
1332 | 1338 | | |
1333 | | - | |
| 1339 | + | |
1334 | 1340 | | |
1335 | 1341 | | |
1336 | 1342 | | |
1337 | 1343 | | |
1338 | 1344 | | |
1339 | | - | |
1340 | | - | |
| 1345 | + | |
| 1346 | + | |
1341 | 1347 | | |
1342 | 1348 | | |
1343 | 1349 | | |
1344 | 1350 | | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
| 1351 | + | |
| 1352 | + | |
1348 | 1353 | | |
1349 | 1354 | | |
1350 | | - | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1351 | 1358 | | |
1352 | 1359 | | |
1353 | 1360 | | |
1354 | 1361 | | |
1355 | 1362 | | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1356 | 1386 | | |
1357 | 1387 | | |
1358 | 1388 | | |
| |||
2803 | 2833 | | |
2804 | 2834 | | |
2805 | 2835 | | |
| 2836 | + | |
| 2837 | + | |
2806 | 2838 | | |
2807 | 2839 | | |
2808 | 2840 | | |
2809 | 2841 | | |
2810 | 2842 | | |
2811 | 2843 | | |
2812 | 2844 | | |
2813 | | - | |
| 2845 | + | |
| 2846 | + | |
2814 | 2847 | | |
2815 | 2848 | | |
2816 | 2849 | | |
2817 | 2850 | | |
2818 | | - | |
2819 | | - | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
2820 | 2856 | | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
2821 | 2920 | | |
2822 | 2921 | | |
2823 | 2922 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments