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

TestSpatialQueries in Dolt #3217

Closed
max-hoffman opened this issue Apr 13, 2022 · 0 comments
Closed

TestSpatialQueries in Dolt #3217

max-hoffman opened this issue Apr 13, 2022 · 0 comments
Assignees

Comments

@max-hoffman
Copy link
Contributor

Queries with ST_SRID appear to be wrapped in geometry types by the dolt integrator, which differs from the expected behavior in GMS memory tables. I think this can be fixed by unwrapping Geometry types in SRID.Eval, but I am not sure whether they should remain wrapped or not.

Test:       	TestSingleQueryPrepared/SELECT_ST_SRID(g,_0)_from_geometry_table_order_by_i
Messages:   	Unexpected result for query SELECT ST_SRID(g, 0) from geometry_table order by i

expected: []sql.Row{sql.Row{sql.Point{SRID:0x0, X:1, Y:2}}, sql.Row{sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:1, Y:2}, sql.Point{SRID:0x0, X:3, Y:4}}}}, sql.Row{sql.Polygon{SRID:0x0, Lines:[]sql.Linestring{sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:0, Y:0}, sql.Point{SRID:0x0, X:0, Y:1}, sql.Point{SRID:0x0, X:1, Y:1}, sql.Point{SRID:0x0, X:0, Y:0}}}}}}, sql.Row{sql.Point{SRID:0x0, X:1, Y:2}}, sql.Row{sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:1, Y:2}, sql.Point{SRID:0x0, X:3, Y:4}}}}, sql.Row{sql.Polygon{SRID:0x0, Lines:[]sql.Linestring{sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:0, Y:0}, sql.Point{SRID:0x0, X:0, Y:1}, sql.Point{SRID:0x0, X:1, Y:1}, sql.Point{SRID:0x0, X:0, Y:0}}}}}}}

actual  : []sql.Row{sql.Row{sql.Geometry{Inner:sql.Point{SRID:0x0, X:1, Y:2}}}, sql.Row{sql.Geometry{Inner:sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:1, Y:2}, sql.Point{SRID:0x0, X:3, Y:4}}}}}, sql.Row{sql.Geometry{Inner:sql.Polygon{SRID:0x0, Lines:[]sql.Linestring{sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:0, Y:0}, sql.Point{SRID:0x0, X:0, Y:1}, sql.Point{SRID:0x0, X:1, Y:1}, sql.Point{SRID:0x0, X:0, Y:0}}}}}}}, sql.Row{sql.Geometry{Inner:sql.Point{SRID:0x0, X:1, Y:2}}}, sql.Row{sql.Geometry{Inner:sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:1, Y:2}, sql.Point{SRID:0x0, X:3, Y:4}}}}}, sql.Row{sql.Geometry{Inner:sql.Polygon{SRID:0x0, Lines:[]sql.Linestring{sql.Linestring{SRID:0x0, Points:[]sql.Point{sql.Point{SRID:0x0, X:0, Y:0}, sql.Point{SRID:0x0, X:0, Y:1}, sql.Point{SRID:0x0, X:1, Y:1}, sql.Point{SRID:0x0, X:0, Y:0}}}}}}}}

I am adding skipped tests for TestSpatialQueries and TestSpatialQueriesPrepared in dolt_engine_test.go.

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

No branches or pull requests

2 participants