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

POLYGON column not working/decoding with DBeaver #4390

Closed
dlscanada opened this issue Sep 22, 2022 · 4 comments
Closed

POLYGON column not working/decoding with DBeaver #4390

dlscanada opened this issue Sep 22, 2022 · 4 comments
Assignees
Labels
bug Something isn't working sql Issue with SQL

Comments

@dlscanada
Copy link

dlscanada commented Sep 22, 2022

I'm not certain if the issue has to do with DBeaver or dolt, but I'm opening the issue here first (because this issue doesn't exist with MySQL/MariaDB databases in DBeaver normally).

Reproduce

  1. Run the following SQL queries with dolt sql < filename.sql
CREATE TABLE dls_canada_llds_byqsec (
  `land_desc` varchar(20) NOT NULL,
  `shape_polygon` polygon NOT NULL,
  `sql_polygon` TEXT NOT NULL,
  PRIMARY KEY (`land_desc`)
  -- , SPATIAL KEY `shape_polygon_idx` (`shape_polygon`)
);

INSERT INTO dls_canada_llds_byqsec (land_desc, shape_polygon, sql_polygon) VALUES ('NE-01-001-01-E1', ST_GeomFromText('POLYGON((-97.336079834 49.015241701,-97.32506399 49.015238443,-97.3250891929999 49.007990061,-97.336105545 49.0079939550001,-97.336079834 49.015241701))'), 'POLYGON((-97.336079834 49.015241701,-97.32506399 49.015238443,-97.3250891929999 49.007990061,-97.336105545 49.0079939550001,-97.336079834 49.015241701))');
INSERT INTO dls_canada_llds_byqsec (land_desc, shape_polygon, sql_polygon) VALUES ('NE-01-001-01-W1', ST_GeomFromText('POLYGON((-97.4707344879999 49.014994,-97.4597223489999 49.014994008,-97.459722375 49.0077470260001,-97.470734522 49.0077470210001,-97.4707344879999 49.014994))'), 'POLYGON((-97.4707344879999 49.014994,-97.4597223489999 49.014994008,-97.459722375 49.0077470260001,-97.470734522 49.0077470210001,-97.4707344879999 49.014994))');
INSERT INTO dls_canada_llds_byqsec (land_desc, shape_polygon, sql_polygon) VALUES ('NE-01-001-01-W2', ST_GeomFromText('POLYGON((-102.01750735 49.0136590390001,-102.006495299 49.0136948310001,-102.006485265 49.006426726,-102.017491339 49.0064115700001,-102.01750735 49.0136590390001))'), 'POLYGON((-102.01750735 49.0136590390001,-102.006495299 49.0136948310001,-102.006485265 49.006426726,-102.017491339 49.0064115700001,-102.01750735 49.0136590390001))');
INSERT INTO dls_canada_llds_byqsec (land_desc, shape_polygon, sql_polygon) VALUES ('NE-01-001-01-W3', ST_GeomFromText('POLYGON((-106.016571066 49.014169623,-106.005428438 49.0141415900001,-106.005432849 49.0069518450001,-106.016572504 49.0069798120001,-106.016571066 49.014169623))'), 'POLYGON((-106.016571066 49.014169623,-106.005428438 49.0141415900001,-106.005432849 49.0069518450001,-106.016572504 49.0069798120001,-106.016571066 49.014169623))');
INSERT INTO dls_canada_llds_byqsec (land_desc, shape_polygon, sql_polygon) VALUES ('NE-01-001-01-W4', ST_GeomFromText('POLYGON((-110.016154999 49.0141580010001,-110.005080998 49.01424,-110.005078998 49.0070120010001,-110.016299999 49.006923,-110.016154999 49.0141580010001))'), 'POLYGON((-110.016154999 49.0141580010001,-110.005080998 49.01424,-110.005078998 49.0070120010001,-110.016299999 49.006923,-110.016154999 49.0141580010001))');
  1. Open the table in DBeaver.
  2. See the following error message:
    image
  3. Similarly, clicking the "Spatial" tab doesn't show anything.

Versions

  • dolt v0.41.4
  • DBeaver 22.2.0
  • Tested with both the MariaDB and MySQL connectors (both fail)
@timsehn timsehn added bug Something isn't working sql Issue with SQL labels Sep 22, 2022
@timsehn
Copy link
Sponsor Contributor

timsehn commented Sep 22, 2022

Looks like a gap in Dolt's sup[port for the polygon type, either on input or output. @jcor11599 is the person who owns spatial types here, so he'll take a look when he gets in.

@jycor
Copy link
Contributor

jycor commented Sep 22, 2022

Hey @dlscanada, I just merged a fix for this issue and it's currently making its way to main.
Expect a release with the fix later this week.

image

@dlscanada
Copy link
Author

Fantastic work, thank you!

@timsehn
Copy link
Sponsor Contributor

timsehn commented Sep 27, 2022

Resolving as this will go out in the next release. Build from main if you need it sooner :-)

@timsehn timsehn closed this as completed Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sql Issue with SQL
Projects
None yet
Development

No branches or pull requests

3 participants