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 TSQL syntax for geospatial functions #2024

Conversation

Anikait143
Copy link
Contributor

@Anikait143 Anikait143 commented Nov 16, 2023

Description

  • This commit contains Support for TSQL syntax for geospatial functions.

  • Added Handling for STX, STY, LAT, LONG, STDistance, STAsText, and STAsBinary functions.

  • Modified Test Cases to check TSQL syntax for geospatial functions

Supported Syntax -

  1. select <col_name>.STX from table; (Simple Select from table with function name at the last Similarly - select <col_name>.STAsText() from table;)

  2. select <table_name>.<col_name>.STX from table; (Simple Select from table with 2-parts call with function name at the last)

  3. Simple Select using a declared variable with function name at the last

DECLARE @point geometry;
SET @point = geometry::STGeomFromText('POINT(-122.34900 47.65100)', 4326);
select @point.STX
select @point.STY
select @point.STAsText()
go
  1. Inserting into a table using a declared variable with function name at the last
DECLARE @point geometry;
SET @point = geometry::STGeomFromText('POINT(-122.34900 47.65100)', 4326);
Insert INTO table(geom) VALUES(geometry::point(@point.STX, @point.STY,4326))
go

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

Test Scenarios Covered

  • Use case based - JDBC -> TestSpatialPoint-vu-verify, Dotnet -> TestPoint.txt

  • Boundary conditions -

  • Arbitrary inputs -

  • Negative test cases -

  • Minor version upgrade tests -

  • Major version upgrade tests -

  • 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.

contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
INSTALLING.md.tmpl Outdated Show resolved Hide resolved
contrib/babelfishpg_common/sql/geography.sql Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/multidb.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Anikait Agrawal added 6 commits November 27, 2023 09:28
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 3 commits November 29, 2023 11:38
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
Signed-off-by: Anikait Agrawal <[email protected]>
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_comp.c Show resolved Hide resolved
@Anikait143 Anikait143 closed this Jan 22, 2024
@Anikait143 Anikait143 deleted the Jira-babel-4370 branch January 22, 2024 23:22
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.

5 participants