Commit 0bd8809
authored
fix: csv schema_infer_max_records set to 0 return null datatype (#19432)
## 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.
-->
- close #19417
## Rationale for this change
- see #19417
- related to #17796
## What changes are included in this PR?
when schema_infer_max_records set to 0 in csv, return datatype as string
## Are these changes tested?
add test case for schema_infer_max_records equal to 0
## 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.
-->1 parent 33ac70d commit 0bd8809
File tree
3 files changed
+88
-28
lines changed- datafusion
- core/src/datasource/file_format
- datasource-csv/src
- docs/source/user-guide/sql
3 files changed
+88
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1536 | 1536 | | |
1537 | 1537 | | |
1538 | 1538 | | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
1539 | 1567 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
214 | 219 | | |
215 | 220 | | |
216 | 221 | | |
| |||
529 | 534 | | |
530 | 535 | | |
531 | 536 | | |
| 537 | + | |
532 | 538 | | |
533 | 539 | | |
534 | 540 | | |
| |||
619 | 625 | | |
620 | 626 | | |
621 | 627 | | |
622 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
623 | 633 | | |
624 | 634 | | |
625 | 635 | | |
626 | 636 | | |
627 | | - | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
628 | 653 | | |
629 | 654 | | |
630 | 655 | | |
| |||
637 | 662 | | |
638 | 663 | | |
639 | 664 | | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
644 | 676 | | |
645 | 677 | | |
646 | 678 | | |
| |||
832 | 864 | | |
833 | 865 | | |
834 | 866 | | |
835 | | - | |
| 867 | + | |
836 | 868 | | |
837 | 869 | | |
838 | 870 | | |
| |||
862 | 894 | | |
863 | 895 | | |
864 | 896 | | |
865 | | - | |
| 897 | + | |
866 | 898 | | |
867 | 899 | | |
868 | 900 | | |
| |||
880 | 912 | | |
881 | 913 | | |
882 | 914 | | |
883 | | - | |
| 915 | + | |
884 | 916 | | |
885 | 917 | | |
886 | 918 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
0 commit comments