Skip to content

Fix GEOMETRY/GEOGRAPHY DATA_TYPE mapping in Thrift getColumns()#1387

Open
sreekanth-db wants to merge 5 commits intomainfrom
fix/geospatial-data-type
Open

Fix GEOMETRY/GEOGRAPHY DATA_TYPE mapping in Thrift getColumns()#1387
sreekanth-db wants to merge 5 commits intomainfrom
fix/geospatial-data-type

Conversation

@sreekanth-db
Copy link
Copy Markdown
Collaborator

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

  • Unit tests added for getCode() with GEOMETRY/GEOGRAPHY
  • Unit tests added for getThriftRows() with geospatial enabled/disabled
  • Verified end-to-end with live workspace (Thrift and SEA now match)
  • Existing MetadataResultSetBuilderTest passes (134 tests)

The Thrift path in getThriftRows() was missing the geospatial type check
for the DATA_TYPE column, causing GEOMETRY/GEOGRAPHY columns to return
DATA_TYPE=0 (NULL) instead of the correct value. The SEA path already
handled this correctly.

Changes:
- Add missing isGeospatialType() check in getThriftRows() DATA_TYPE
  handler, matching the existing SEA getRows() logic
- Add GEOMETRY/GEOGRAPHY to getCode() mapping as Types.OTHER (1111),
  consistent with VARIANT handling
- Add unit tests for both geospatial enabled and disabled scenarios

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <[email protected]>
Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants