Support MySQL unclosed polygons, switch to go-geom#4135
Support MySQL unclosed polygons, switch to go-geom#4135
Conversation
❌ 6 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
❌ Test FailureAnalysis: Test_MySQL_Geometric_Types consistently fails across all matrix variants with MySQL error 3037 "Invalid GIS data provided to function st_geomfromtext", caused by the PR's unclosed polygon test data being rejected by MySQL. |
serprex
left a comment
There was a problem hiding this comment.
pretty sure we went with go-geos because go-geom didn't have enough for postgis compat. mysql compat should be much simpler tho
|
Current status is we're declaring invalid geometry as unsupported for now (as MySQL 8 or even fresh 5.7 would refuse the insert) but open to reconsidering if more cases come up |
MySQL <5.7.9 had a bug where unclosed polygons were accepted even though they're invalid according to the spec https://bugs.mysql.com/bug.php?id=77505
Switching from go-geos to go-geom solves this. The downside is that MultiPoint output is different,
MULTIPOINT (5 6, 7 8)vs oldMULTIPOINT ((5 6), (7 8)), but ClickHouse doesn't support multipoint either way (although regex parsing would be easier for the old one).ClickHouse does support unclosed polygons.