Open bkyryliuk opened 1 month ago
It also looks like it may have been fixed in the newer versions: https://github.com/databricks/databricks-sql-python/pull/357/files it would be nice to backport it to 2.9.6
Tested that fix works via setting DatabricksDialect.supports_native_boolean = True
Pro-tip: one of the reasons why the compile
statement looks correct is because it's using the default statement compiler, rather than the one employed by this connector. If you want to truly see what the rendered query will look like you, need to pass the Databricks dialect to your compile()
call.
stmt.compile(compile_kwargs={"literal_binds": True}, dialect=DatabricksDialect())
This doesn't fix your underlying issue, but hopefully helps you chase down issues in the future.
Version 2.9.6
Repro:
Compiled statement is printed as expected:
However conn.execute(stmt) executes different statement:
That leads to the exception