Commit f2f57ec
authored
Fix GEOMETRY/GEOGRAPHY DATA_TYPE mapping in Thrift getColumns() (#1387)
## Summary
- Thrift `getThriftRows()` was missing the `isGeospatialType()` check
for the `DATA_TYPE` column in `getColumns()`, causing GEOMETRY/GEOGRAPHY
columns to return `DATA_TYPE=0` (NULL) instead of the correct value
- Added GEOMETRY/GEOGRAPHY to `getCode()` mapping as `Types.OTHER`
(1111), consistent with VARIANT handling
- When geospatial is disabled: `DATA_TYPE=12` (VARCHAR); when enabled:
`DATA_TYPE=1111` (OTHER)
## Test plan
- [x] Unit tests added for `getCode()` with GEOMETRY/GEOGRAPHY
- [x] Unit tests added for `getThriftRows()` with geospatial
enabled/disabled
- [x] Verified end-to-end with live workspace (Thrift and SEA now match)
- [x] Existing `MetadataResultSetBuilderTest` passes (134 tests)
---------
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>1 parent c9a7beb commit f2f57ec
3 files changed
Lines changed: 51 additions & 2 deletions
File tree
- src
- main/java/com/databricks/jdbc/dbclient/impl/common
- test/java/com/databricks/jdbc/dbclient/impl/common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1131 | 1131 | | |
1132 | 1132 | | |
1133 | 1133 | | |
| 1134 | + | |
| 1135 | + | |
1134 | 1136 | | |
1135 | 1137 | | |
1136 | 1138 | | |
| |||
1626 | 1628 | | |
1627 | 1629 | | |
1628 | 1630 | | |
1629 | | - | |
1630 | | - | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
1631 | 1635 | | |
1632 | 1636 | | |
1633 | 1637 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
818 | 820 | | |
819 | 821 | | |
820 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
821 | 865 | | |
822 | 866 | | |
823 | 867 | | |
| |||
0 commit comments