Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GEOGRAPHY and GEOMETRY datatypes along with TDS Sender Support #1819

Merged

Conversation

Anikait143
Copy link
Contributor

@Anikait143 Anikait143 commented Sep 5, 2023

Description

AS Babel User
I WANT support to be added for GEOGRAPHY and GEOMETRY data types
SO I can use this special data type to store and manipulate geospatial data

  • This PR contains Support for GEOGRAPHY and GEOGRAPHY datatype for Point Type and also TDS sender Support for
    these Spatial DataTypes so that we can send result of queries with GEOGRAPHY and GEOMETRY columns to TDS clients.

  • Added SQL files which contains the following definitions and functionalities:

    [Geography variable]
    [Geography column]
    [Geometry variable]
    [Geometry column]
    Spatial type modifier [Point]
    Spatial method [.Lat]
    Spatial method [.Long]
    Spatial support method [STGeomFromText]
    Spatial support method [STPointFromText]
    Spatial support method [.STDistance]
    Spatial support method .STAsText
    Spatial support method .STAsBinary
    as well as modifications to the antlr parser in order to support the scope parameter (::)

  • Added new tests TestSpatialPoint-vu-* to test these implemented functionalities.

  • Added build scripts for PostGIS extension in the Github Actions.

  • Added Spatial Type Enable Switch so that user can freely use these types after building PostGIS Extension

  • Created a new version dump - 3.3.0 (babelfishpg_common--3.2.0--3.3.0.sql) to support the sql files for spatialtypes

  • Created automated creation for upgrade files

Task: BABEL- 4323
Authored-by: Anikait Agrawal [email protected]
Signed-off-by: Anikait Agrawal [email protected]

Test Scenarios Covered

  • Use case based - TestSpatialPoint-vu-*

  • Boundary conditions -

  • Arbitrary inputs -

  • Negative test cases - TestSpatialPoint-vu-*

  • Minor version upgrade tests - added PostGIS installation scripts to Github Actions and upgrade file babelfishpg_common--3.2.0--3.3.0.sql

  • Major version upgrade tests - added PostGIS installation scripts to Github Actions and upgrade file babelfishpg_common--3.2.0--3.3.0.sql

  • Performance tests -

  • Tooling impact -

  • Client tests -

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Anikait Agrawal added 15 commits September 4, 2023 20:01
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Anikait Agrawal added 9 commits September 11, 2023 05:32
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
@timchang514
Copy link
Contributor

Do we have a way of testing that the build works when postgis fails or is not installed?

.github/composite-actions/setup-new-version/action.yml Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tds_data_map.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/include/tds_request.h Outdated Show resolved Hide resolved
test/JDBC/expected/BABEL-UNSUPPORTED.out Outdated Show resolved Hide resolved
.github/composite-actions/install-dependencies/action.yml Outdated Show resolved Hide resolved
.github/composite-actions/setup-base-version/action.yml Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/include/tds_iofuncmap.h Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/Makefile Outdated Show resolved Hide resolved
test/JDBC/expected/BABEL-UNSUPPORTED.out Outdated Show resolved Hide resolved
Signed-off-by: Anikait Agrawal <[email protected]>
Copy link
Contributor

@rishabhtanwar29 rishabhtanwar29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Copy link
Contributor

@timchang514 timchang514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, but let's remember to address the upgrade questions brought up in the slack room

@jsudrik jsudrik merged commit 00c87ad into babelfish-for-postgresql:BABEL_3_X_DEV Sep 28, 2023
26 checks passed
@Anikait143 Anikait143 deleted the jira-BABEL-4323 branch September 28, 2023 08:13
Sairakan pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 21, 2023
…r Support (babelfish-for-postgresql#1819)"

This reverts commit 00c87ad.

THIS IS A TEMPORARY REVERT TO ALLOW THE GITHUB ACTIONS TO RUN TESTS.
THIS NEEDS TO BE UN-REVERTED AFTER BABEL_main IS BROUGHT UP TO DATE
Sairakan pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 21, 2023
Sairakan pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 21, 2023
ahmed-shameem pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 23, 2023
ahmed-shameem pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 24, 2023
ahmed-shameem pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 27, 2023
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.

6 participants