Commit 3f2099c
Add EnableGeoSpatialSupport connection parameter to gate geospatial types (#1094)
## Description
Adds a new connection parameter EnableGeoSpatialSupport to independently
gate native GEOMETRY and GEOGRAPHY data type support in the JDBC driver.
Key changes:
- Added EnableGeoSpatialSupport parameter to DatabricksJdbcUrlParams
(default: 0)
- Implemented isGeoSpatialSupportEnabled() in connection context with
prerequisite check for EnableComplexDatatypeSupport
- Updated ArrowStreamResult.getObject() to convert geospatial types to
STRING when flag is disabled
- Updated MetadataResultSetBuilder to report geospatial columns as
VARCHAR when flag is disabled
- Added telemetry tracking for the new parameter
- Added comprehensive unit tests for flag behavior and type conversion
logic
When EnableGeoSpatialSupport=0 (default):
- GEOMETRY and GEOGRAPHY columns are returned as STRING type
- Backward compatible with existing applications
When EnableGeoSpatialSupport=1 AND EnableComplexDatatypeSupport=1:
- GEOMETRY and GEOGRAPHY columns are returned as native
DatabricksGeometry and DatabricksGeography objects
This change provides opt-in support for geospatial types while
maintaining backward compatibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- Provide a brief summary of the changes made and the issue they aim
to address.-->
## Testing
<!-- Describe how the changes have been tested-->
Added tests
## Additional Notes to the Reviewer
<!-- Share any additional context or insights that may help the reviewer
understand the changes better. This could include challenges faced,
limitations, or compromises made during the development process.
Also, mention any areas of the code that you would like the reviewer to
focus on specifically. -->
---------
Co-authored-by: Claude <[email protected]>1 parent 7fdb141 commit 3f2099c
File tree
13 files changed
+1025
-9
lines changed- src
- main/java/com/databricks/jdbc
- api
- impl
- arrow
- internal
- common
- dbclient/impl/common
- model/telemetry
- telemetry
- test/java/com/databricks/jdbc/api/impl
- arrow
13 files changed
+1025
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
918 | 925 | | |
919 | 926 | | |
920 | 927 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
495 | 505 | | |
496 | 506 | | |
497 | 507 | | |
| |||
Lines changed: 40 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
98 | 110 | | |
99 | 111 | | |
100 | 112 | | |
| |||
106 | 118 | | |
107 | 119 | | |
108 | 120 | | |
109 | | - | |
110 | | - | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
| |||
211 | 222 | | |
212 | 223 | | |
213 | 224 | | |
214 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
215 | 228 | | |
216 | 229 | | |
217 | 230 | | |
218 | 231 | | |
219 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
220 | 235 | | |
221 | 236 | | |
222 | 237 | | |
223 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
224 | 250 | | |
225 | 251 | | |
226 | 252 | | |
| |||
672 | 698 | | |
673 | 699 | | |
674 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
675 | 711 | | |
676 | 712 | | |
677 | 713 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
145 | 163 | | |
146 | 164 | | |
147 | 165 | | |
| |||
174 | 192 | | |
175 | 193 | | |
176 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
177 | 206 | | |
178 | 207 | | |
179 | 208 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | | - | |
197 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
241 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
242 | 250 | | |
243 | 251 | | |
244 | 252 | | |
| |||
552 | 560 | | |
553 | 561 | | |
554 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
555 | 577 | | |
556 | 578 | | |
557 | 579 | | |
| |||
897 | 919 | | |
898 | 920 | | |
899 | 921 | | |
900 | | - | |
901 | | - | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
902 | 927 | | |
903 | 928 | | |
904 | 929 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
281 | 289 | | |
282 | 290 | | |
283 | 291 | | |
| |||
379 | 387 | | |
380 | 388 | | |
381 | 389 | | |
| 390 | + | |
382 | 391 | | |
383 | 392 | | |
384 | 393 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
0 commit comments