-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(pyspark): escaping hyphenated table names doesn't work #10577
Comments
Thanks for the issue, and happy new year! This definitely looks like a bug. |
This appears to be an issue with Spark itself, which handles this situation poorly. Running the following code
results in this error
Curiously, spark still manages to create the table on disk:
When I then run
I get an entirely different error message:
Spark is determined to defeat both itself and its users here. I don't think there's anything Ibis can do to help here. |
Thanks for looking into this and happy new year to you as well @cpcloud! Will make sure to double check the underlying implementation next time to save you the debugging. |
What happened?
When running against a databricks instance using the spark connector i manage to work with all sorts of catalog names (backticks, hyphens, etc.) but cannot get the same to work for table names. Escaping the table name using backticks before getting the ibis table does not work as shows below.
Table looks like the following:
traceback
This seems to be an issue with how the sqlglot expression is turned into a sqlstring as it gives me (see L.156,
backends/sql/__init__.py
:Not escaping the table name leads to a different error
traceback
What version of ibis are you using?
ibis: 9.5.0
pyspark: 3.5.0
sqlglot: 25.20.2
sqlglotrs: 0.2.12
What backend(s) are you using, if any?
spark
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: