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

Implemented TDS Receiver Support for Spatial Datatypes and Tested both Sender and Receiver functions with JDBC, ODBC and DOTNET Drivers #1921

Merged

Conversation

Anikait143
Copy link
Contributor

@Anikait143 Anikait143 commented Oct 15, 2023

Description

  • This commit contains Receiver Support for GEOGRAPHY and GEOGRAPHY datatype for Point Type and also tested the Sender and Receiver functions with JDBC, ODBC and DOTNET drivers.

  • Added CAST (Varbinary to Geometry/Geography and vice-versa) required by JDBC driver to receiver Geometry/Geography as Varbinary.

  • Introduced appropriate error messages when an unsupported functionality(such as LINESTRING) is queried.

  • Added Receiver function required by DOTNET driver to receiver Geometry/Geography as CLRUDT types.

  • Added new tests in TestSpatialPoint-vu-* to test receiver function for JDBC driver.

  • Added logic to parse the geometry/geography inputs in JDBCPreparedStatement.java file.

  • Added new tests TestPoint.txt to test Sender and Receiver functions for DOTNET driver.

  • Added logic to parse the geometry/geography inputs in PrepareExecBinding.cs file.

  • Added new tests geometry.cpp and geography.cpp to test Sender and Receiver functions for ODBC driver.

  • Added some sender function tests in test_data_types.cpp file for ODBC driver.

  • Tested the changes with valgrind and didn't see any memory issues.

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

Test Scenarios Covered

  • Use case based - TestSpatialPoint-vu-*, TestPoint.txt, geometry.cpp, geography.cpp

  • Boundary conditions -

  • Arbitrary inputs -

  • Negative test cases - TestSpatialPoint-vu-*

  • Minor version upgrade tests -

  • Major version upgrade tests -

  • Performance tests -

  • Tooling impact -

  • Memory tests - Tested the changes with valgrind

  • 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 and others added 3 commits October 15, 2023 21:13
sender and Receiver functions with JDBC, ODBC and DOTNET Drivers

Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
contrib/babelfishpg_common/Makefile Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdsrpc.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdsrpc.c Outdated Show resolved Hide resolved
test/JDBC/expected/TestPoint-vu-prepare.out Outdated Show resolved Hide resolved
test/JDBC/input/datatypes/TestPoint.txt Outdated Show resolved Hide resolved
test/JDBC/expected/TestPoint-vu-verify.out Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geometry.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_tds/src/backend/tds/tdsrpc.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/backend/tds/tdstypeio.c Outdated Show resolved Hide resolved
test/odbc/mssqlodbc/test_data_types.cpp 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.

Overall looks good, tests for supported/unsupported casts are missing but it can be done in a followup PR.

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.

Generally LGTM, but error messages should be clarified

contrib/babelfishpg_common/sql/geometry.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geometry.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geometry.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geometry.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geometry.sql 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.

Please remove AS BABEL user part from the description as we don't need to mention it again and mention this commit instead of this PR as eventually the description is going to commit message.

@shardgupta shardgupta merged commit 3a0259b into babelfish-for-postgresql:BABEL_3_X_DEV Oct 23, 2023
27 checks passed
@shardgupta shardgupta deleted the jira-BABEL-4369 branch October 23, 2023 08:34
Sairakan pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 21, 2023
…sted both Sender and Receiver functions with JDBC, ODBC and DOTNET Drivers (babelfish-for-postgresql#1921)"

This reverts commit 3a0259b.
Sairakan pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 21, 2023
…sted both Sender and Receiver functions with JDBC, ODBC and DOTNET Drivers (babelfish-for-postgresql#1921)"

This reverts commit 3a0259b.
ahmed-shameem pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 23, 2023
…sted both Sender and Receiver functions with JDBC, ODBC and DOTNET Drivers (babelfish-for-postgresql#1921)"

This reverts commit 3a0259b.
ahmed-shameem pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 24, 2023
…sted both Sender and Receiver functions with JDBC, ODBC and DOTNET Drivers (babelfish-for-postgresql#1921)"

This reverts commit 3a0259b.
ahmed-shameem pushed a commit to amazon-aurora/babelfish_extensions that referenced this pull request Nov 27, 2023
…sted both Sender and Receiver functions with JDBC, ODBC and DOTNET Drivers (babelfish-for-postgresql#1921)"

This reverts commit 3a0259b.
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.

4 participants