You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GMS should make sure that all elements within a single column in the query-result share the same type.
It doesn't, and so is not consistent with MySQL behaviour.
Reproduction:
Given the following SQL:
CREATETABLEpeople (name VARCHAR(50), age INT);
INSERT INTO people VALUES ('sam', 44), ('ben', NULL);
SELECT name, coalesce(age, 0.0) AS coalesced FROM people;
Problem
GMS should make sure that all elements within a single column in the query-result share the same type.
It doesn't, and so is not consistent with MySQL behaviour.
Reproduction:
Given the following SQL:
I should see the
![Image](https://private-user-images.githubusercontent.com/2903904/410953382-5a931a7e-0a80-4b4b-9687-a733406e27e7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTgzMzYsIm5iZiI6MTczODk5ODAzNiwicGF0aCI6Ii8yOTAzOTA0LzQxMDk1MzM4Mi01YTkzMWE3ZS0wYTgwLTRiNGItOTY4Ny1hNzMzNDA2ZTI3ZTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDcwMDM2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjNjYzRlNmVjM2RjZWE2YmRjMTM2M2E3ZTY1MDRhOTRjZjViNmE1ZjEzYTZjYWQwNmMxM2UwZTUyMjM3MzQ4MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.l_CrDO5TzP7y8obdmbccXlrmO0qdsUpRIcpPAmhAiFU)
coalesced
column containing floats.And it does on SQLFiddle: https://sqlfiddle.com/mysql/online-compiler?id=8c51ae86-a4ae-4dbf-8ecd-0d56803fdb5d
But in GMS the
44
comes back as(int64) 44
, while the0
value comes back as(string) (len=3) "0.0"
I've written a failing test case for this, and pushed it up into a PR so you can take a look - see this PR: #2846
I don't know how to fix this issue, but I'm certain it doesn't match what MySQL does here.
The text was updated successfully, but these errors were encountered: