You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading a table using the delta sharing client fails if the share, schema, or table contains a dot (.) in their names.
>>> spark.read.format("deltaSharing").load("file:///tmp/profile.json#`my.share`.`my.schema`.`my.table`")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/.../py-envs/spark-3.5.1/lib/python3.11/site-packages/pyspark/sql/readwriter.py", line 307, in load
return self._df(self._jreader.load(path))
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../py-envs/spark-3.5.1/lib/python3.11/site-packages/pyspark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__
File "/Users/.../py-envs/spark-3.5.1/lib/python3.11/site-packages/pyspark/errors/exceptions/captured.py", line 185, in deco
raise converted from None
pyspark.errors.exceptions.captured.IllegalArgumentException: path file:///tmp/profile.json#`my.share`.`my.schema`.`my.table` is not valid
This issue can be reproduced on the latest delta sharing client version.
The problem comes from path parsing implemented here, which splits the path on . characters, regardless of escaping.
The delta sharing API does not have any restrictions on share, schema, or table names, aside from mentioning they are case-insensitive.
So the expectation is that some sort of escaping could be applied to allow targeting shares with . in the name.
Example JVM stacktrace
java.lang.IllegalArgumentException: path file:///tmp/profile.json#`my.share`.`my.schema`.`my.table` is not valid
at io.delta.sharing.client.DeltaSharingRestClient$.parsePath(DeltaSharingClient.scala:970)
at io.delta.sharing.spark.DeltaSharingDataSource.autoResolveBaseRelationForSnapshotQuery(DeltaSharingDataSource.scala:317)
at io.delta.sharing.spark.DeltaSharingDataSource.createRelation(DeltaSharingDataSource.scala:237)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:346)
at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:229)
at org.apache.spark.sql.DataFrameReader.$anonfun$load$2(DataFrameReader.scala:211)
at scala.Option.getOrElse(Option.scala:189)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:186)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:374)
at py4j.Gateway.invoke(Gateway.java:282)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
at java.base/java.lang.Thread.run(Thread.java:840)
The text was updated successfully, but these errors were encountered:
Loading a table using the delta sharing client fails if the share, schema, or table contains a dot (
.
) in their names.This issue can be reproduced on the latest delta sharing client version.
The problem comes from path parsing implemented here, which splits the path on
.
characters, regardless of escaping.The delta sharing API does not have any restrictions on share, schema, or table names, aside from mentioning they are case-insensitive.
So the expectation is that some sort of escaping could be applied to allow targeting shares with
.
in the name.Example JVM stacktrace
The text was updated successfully, but these errors were encountered: