Closed grieve54706 closed 1 week ago
I also found if the sql syntax is invalid, the dm_exec_describe_first_result_set
will not fail and return None
and error_message
like Invalid object name 'X'
when sql is select * from X
a non-existent table.
Thanks for raising this, @grieve54706 ! I think this shouldn't be hard to handle better -- we can ask for error codes and error messages from dm_exec_describe_first_result_set
and handle those accordingly.
Hi @gforsyth, Thank you for helping me so quickly.
What happened?
When I use function
sql()
ofmssql
with a non-exist column like belowibis will throw
'NoneType' object has no attribute 'lower'
Because the function will get schema by_get_schema_using_query()
https://github.com/ibis-project/ibis/blob/ea1c179036b10b53e58156a0bfc3e31f3472a388/ibis/backends/mssql/__init__.py#L307-L335
But the rows will get
[(None, None, None, None, None), (None, None, None, None, None)]
and put theNone
intoself.compiler.type_mapper.from_string()
Maybe we should check if the value is None or not.
What version of ibis are you using?
9.5.0
What backend(s) are you using, if any?
mssql
Relevant log output
Code of Conduct