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

Function to export spatial types to not create correct output types #3279

Closed
noamross opened this issue Apr 22, 2022 · 1 comment
Closed
Assignees

Comments

@noamross
Copy link
Contributor

When converting spatial types to other formats via st_astext, st_aswkt, or st_asgeojson, the results are not of any TEXT or VARCHAR type, but instead are still spatial types. In working from R with the RMariaDB library, this results in the return type of the results being interpreted as empty blobs.

create table us_state_capitals (state varchar(50) primary key, city varchar(50), coord point);
insert into us_state_capitals values ('alabama', 'montgomery', st_srid(point(32.361667, -86.279167), 4326));
doltdb> describe us_state_capitals;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| state | varchar(50) | NO   | PRI |         |       |
| city  | varchar(50) | YES  |     |         |       |
| coord | point       | YES  |     |         |       |
+-------+-------------+------+-----+---------+-------+
doltdb> select st_astext(coord) as wkt from us_state_capitals;
+-----------------------------+
| wkt                         |
+-----------------------------+
| POINT(32.361667 -86.279167) |
+-----------------------------+
doltdb> CREATE TEMPORARY TABLE `temp` select st_astext(coord) as wkt from us_state_capitals limit 0;
doltdb> describe temp;
+-------+-------+------+-----+---------+-------+
| Field | Type  | Null | Key | Default | Extra |
+-------+-------+------+-----+---------+-------+
| wkt   | point | YES  |     |         |       |
+-------+-------+------+-----+---------+-------+
@jycor
Copy link
Contributor

jycor commented Apr 27, 2022

Fix for this issue should be in the release made earlier today.

@jycor jycor closed this as completed Apr 27, 2022
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