Open cmartin1968 opened 3 months ago
Indeed, seems the returned result does not use the mysql db original schema, e.g
SELECT * FROM mysql_query('mysqldb',
'SELECT unit_price FROM tickets')
with the original tickets.unit_price as a decimal(19,2) returns, depending on the selected rows a different DECIMAL type, with sometimes NULL values. On the other hand :
CREATE OR REPLACE TABLE duckdb_my_table AS SELECT * FROM mysqldb.my_table;
does the job.
mariadb version : 10.11.8-MariaDB-0ubuntu0.24.04.1
duckdb version : v0.10.2
I ran across some odd behavior using the mysql extension with duckdb version 0.10.2. I'm querying a mysql table with a DECIMAL data type and creating a Polars dataframe. If I query the table directly I get the expected result. If however I use the mysql_query function (e.g. sql passthrough), the values for the DECIMAL type are silently converted to NULL values. Is this a bug or perhaps a limitation in the features of this function? This happens when converting to Polars and Pandas.
To reproduce:
In MySQL (MariaDB):
In Python: