Commit 922f590
authored
geospatial fixes (#1062)
## Description
<!-- Provide a brief summary of the changes made and the issue they aim
to address.-->
This PR addresses comments from Milan's review on PR #988 (Geospatial
support implementation).
## Changes
### 1. Cache WKB Value for Performance
- Added `wkb` field to `AbstractDatabricksGeospatial` to cache WKB
representation
- WKB now computed once in constructor instead of on every `getWKB()`
call
### 2. Simplify SRID Extraction Logic
- Removed metadata-based SRID extraction entirely
- Per Milan's clarification: "SRID is always present in EWKT unless it's
0"
- Simplified `convertToGeospatial()` to only extract SRID from EWKT data
- Removed `extractSRIDFromMetadata()` method and regex patterns
- Removed unused `arrowMetadata` parameter from `convertToGeospatial()`
## Testing
- All unit tests are passing
## 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. -->
NO_CHANGELOG=true
(changelog already added in previous PR)
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>1 parent 4d13570 commit 922f590
2 files changed
Lines changed: 12 additions & 62 deletions
File tree
- src/main/java/com/databricks/jdbc/api/impl
- converters
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
Lines changed: 8 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| |||
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
| |||
148 | 141 | | |
149 | 142 | | |
150 | 143 | | |
151 | | - | |
| 144 | + | |
152 | 145 | | |
153 | 146 | | |
154 | 147 | | |
| |||
177 | 170 | | |
178 | 171 | | |
179 | 172 | | |
180 | | - | |
| 173 | + | |
181 | 174 | | |
182 | 175 | | |
183 | | - | |
184 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
185 | 180 | | |
186 | 181 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 182 | | |
195 | | - | |
196 | | - | |
| 183 | + | |
| 184 | + | |
197 | 185 | | |
198 | 186 | | |
199 | 187 | | |
| |||
327 | 315 | | |
328 | 316 | | |
329 | 317 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | 318 | | |
0 commit comments