我能够从 SQL 中读取带有空值的数据,除非创建了像这样的列NULL as col
。这会导致 Rust 恐慌:
thread '<unnamed>' panicked at 'not implemented: MYSQL_TYPE_NULL', /__w/connector-x/connector-x/connectorx/src/sources/mysql/typesystem.rs:119:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
pyo3_runtime.PanicException: not implemented: MYSQL_TYPE_NULL
这是有问题的查询:
SELECT
col1 as col1_modified,
col2 as col2_modified,
col3 as col3_modified,
col4,
col5, col6, col7, col8,
col9, col10,
col11, col12, col13, col14, col15, col16,
col17,
null as bad_col,
col19 as col19_modified
FROM my_schema.my_table
WHERE cond = 1
bad_col 存在,但有时它的值不相关,因此我将其设置为 null 以用作指示。查询在替换为 时运行null as bad_col
。bad_col
然后我可以手动将其全部设置为 null。
有没有办法修复这个null as column_name
破坏 polars 的 read_database_uri() 模式的问题?