Commit 58b850e
authored
Adds fallback for complex types [ES-1469237] (#834)
* adds fallback for complex types
* Add null check for requiredType in getArrowMetadataWithComplexTypeFallback method
* Refactor ArrowStreamResult to simplify complex type handling and remove unused constants
* undo
* Enhance ArrowStreamResult with complex type handling and add unit tests for validation
* Add complex type handling in DatabricksResultSet and improve exception messages for disabled support
- Introduced a private method `isComplexType` to streamline complex type checks.
- Updated exception messages in `getArray`, `getMap`, and `getStruct` methods to provide clearer guidance on enabling complex datatype support.
- Added unit tests to verify exception handling when complex datatype support is disabled.
* Refactor exception handling in DatabricksResultSet to use DatabricksSQLException
- Updated methods getArray, getStruct, and getMap to throw DatabricksSQLException with specific error codes when complex datatype support is disabled.
- Enhanced logging for error conditions to improve debugging and user guidance.
- Adjusted unit tests to verify the new exception types and error codes.
* - Added a logger to ArrowStreamResult to provide debug information when complex datatype support is disabled.
- Improved clarity in handling complex types by logging the conversion to STRING when necessary.1 parent d0a6274 commit 58b850e
File tree
4 files changed
+125
-10
lines changed- src
- main/java/com/databricks/jdbc/api/impl
- arrow
- test/java/com/databricks/jdbc/api/impl
- arrow
4 files changed
+125
-10
lines changedLines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
475 | 485 | | |
476 | 486 | | |
477 | 487 | | |
| |||
482 | 492 | | |
483 | 493 | | |
484 | 494 | | |
485 | | - | |
486 | | - | |
487 | | - | |
| 495 | + | |
488 | 496 | | |
489 | 497 | | |
490 | 498 | | |
| |||
1151 | 1159 | | |
1152 | 1160 | | |
1153 | 1161 | | |
1154 | | - | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1155 | 1167 | | |
1156 | 1168 | | |
1157 | 1169 | | |
1158 | | - | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1159 | 1174 | | |
1160 | 1175 | | |
1161 | 1176 | | |
| |||
1174 | 1189 | | |
1175 | 1190 | | |
1176 | 1191 | | |
1177 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1178 | 1197 | | |
1179 | 1198 | | |
1180 | 1199 | | |
1181 | | - | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
1182 | 1204 | | |
1183 | 1205 | | |
1184 | 1206 | | |
| |||
1197 | 1219 | | |
1198 | 1220 | | |
1199 | 1221 | | |
1200 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
1201 | 1227 | | |
1202 | 1228 | | |
1203 | 1229 | | |
1204 | | - | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1205 | 1234 | | |
1206 | 1235 | | |
1207 | 1236 | | |
| |||
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | | - | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
132 | 161 | | |
133 | 162 | | |
134 | 163 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
1205 | 1206 | | |
1206 | 1207 | | |
1207 | 1208 | | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1208 | 1251 | | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
212 | 226 | | |
213 | 227 | | |
214 | 228 | | |
| |||
0 commit comments