Commit f7dabd8
[SPARK-37326][SQL][FOLLOW-UP] Update code and tests for TimestampNTZ support in CSV data source
### What changes were proposed in this pull request?
This is a follow-up PR to #34596. There were a few comments and suggestions raised after the PR was merged, so I addressed them in this follow-up:
- Instead of using `failOnError`, which was confusing as no error was thrown in the method, we use `allowTimeZone` which has an opposite meaning of `failOnError` and far more descriptive.
- I updated a few test names to resolve ambiguity.
- I changed the tests to use `withTempPath` as was suggested in the original PR.
### Why are the changes needed?
Code cleanup and clarifications.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing unit and integration tests.
Closes #34777 from sadikovi/timestamp-ntz-csv-follow-up.
Authored-by: Ivan Sadikov <ivan.sadikov@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>1 parent 0b42cd4 commit f7dabd8
6 files changed
Lines changed: 45 additions & 56 deletions
File tree
- sql
- catalyst/src
- main/scala/org/apache/spark/sql/catalyst
- csv
- util
- test/scala/org/apache/spark/sql/catalyst/util
- core/src/test/scala/org/apache/spark/sql/execution/datasources/csv
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| |||
Lines changed: 26 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
| 1015 | + | |
| 1016 | + | |
1019 | 1017 | | |
1020 | 1018 | | |
1021 | 1019 | | |
1022 | 1020 | | |
1023 | 1021 | | |
1024 | | - | |
| 1022 | + | |
1025 | 1023 | | |
1026 | 1024 | | |
1027 | 1025 | | |
1028 | 1026 | | |
1029 | 1027 | | |
1030 | 1028 | | |
1031 | 1029 | | |
1032 | | - | |
| 1030 | + | |
1033 | 1031 | | |
1034 | 1032 | | |
1035 | 1033 | | |
1036 | 1034 | | |
1037 | 1035 | | |
1038 | 1036 | | |
1039 | 1037 | | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
| 1038 | + | |
| 1039 | + | |
1044 | 1040 | | |
1045 | 1041 | | |
1046 | 1042 | | |
1047 | 1043 | | |
1048 | 1044 | | |
1049 | | - | |
| 1045 | + | |
1050 | 1046 | | |
1051 | 1047 | | |
1052 | 1048 | | |
1053 | 1049 | | |
1054 | 1050 | | |
1055 | 1051 | | |
1056 | 1052 | | |
1057 | | - | |
| 1053 | + | |
1058 | 1054 | | |
1059 | 1055 | | |
1060 | 1056 | | |
| |||
1063 | 1059 | | |
1064 | 1060 | | |
1065 | 1061 | | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
| 1062 | + | |
1069 | 1063 | | |
1070 | 1064 | | |
1071 | 1065 | | |
1072 | 1066 | | |
1073 | 1067 | | |
1074 | 1068 | | |
1075 | | - | |
| 1069 | + | |
1076 | 1070 | | |
1077 | 1071 | | |
1078 | 1072 | | |
1079 | 1073 | | |
1080 | 1074 | | |
1081 | | - | |
| 1075 | + | |
1082 | 1076 | | |
1083 | 1077 | | |
1084 | 1078 | | |
1085 | 1079 | | |
1086 | 1080 | | |
1087 | 1081 | | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
| 1082 | + | |
1091 | 1083 | | |
1092 | 1084 | | |
1093 | 1085 | | |
1094 | 1086 | | |
1095 | 1087 | | |
1096 | | - | |
| 1088 | + | |
1097 | 1089 | | |
1098 | 1090 | | |
1099 | 1091 | | |
| |||
1105 | 1097 | | |
1106 | 1098 | | |
1107 | 1099 | | |
1108 | | - | |
| 1100 | + | |
1109 | 1101 | | |
1110 | 1102 | | |
1111 | 1103 | | |
| |||
1124 | 1116 | | |
1125 | 1117 | | |
1126 | 1118 | | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
| 1119 | + | |
1130 | 1120 | | |
1131 | 1121 | | |
1132 | 1122 | | |
| |||
1135 | 1125 | | |
1136 | 1126 | | |
1137 | 1127 | | |
1138 | | - | |
| 1128 | + | |
1139 | 1129 | | |
1140 | 1130 | | |
1141 | 1131 | | |
1142 | 1132 | | |
1143 | 1133 | | |
1144 | 1134 | | |
1145 | | - | |
| 1135 | + | |
1146 | 1136 | | |
1147 | 1137 | | |
1148 | 1138 | | |
1149 | 1139 | | |
1150 | | - | |
| 1140 | + | |
1151 | 1141 | | |
1152 | 1142 | | |
1153 | 1143 | | |
| |||
1164 | 1154 | | |
1165 | 1155 | | |
1166 | 1156 | | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
| 1157 | + | |
1170 | 1158 | | |
1171 | 1159 | | |
1172 | 1160 | | |
1173 | 1161 | | |
1174 | 1162 | | |
1175 | 1163 | | |
1176 | 1164 | | |
1177 | | - | |
| 1165 | + | |
1178 | 1166 | | |
1179 | 1167 | | |
1180 | 1168 | | |
1181 | 1169 | | |
1182 | | - | |
1183 | | - | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1184 | 1174 | | |
1185 | 1175 | | |
1186 | 1176 | | |
| |||
1204 | 1194 | | |
1205 | 1195 | | |
1206 | 1196 | | |
1207 | | - | |
1208 | | - | |
| 1197 | + | |
1209 | 1198 | | |
1210 | | - | |
| 1199 | + | |
1211 | 1200 | | |
1212 | 1201 | | |
1213 | 1202 | | |
| |||
0 commit comments