Skip to content

Conversation

@hfutatzhanghb
Copy link
Contributor

@hfutatzhanghb hfutatzhanghb commented Jan 12, 2026

Spark Dataframe saveAsTable fails due to missing NoSuchTableException.
We met below error when upgrade lance projects version.

py4j.protocol.Py4JJavaError: An error occurred while calling o140.saveAsTable.
: TableNotFoundException{code=4, message='Table does not exist: lance_test_database.blobtable2', detail='TableNotFound', instance='lance_test_database.blobtable2'}
	at org.lance.namespace.hive2.Hive2Namespace.describeTable(Hive2Namespace.java:286)
	at org.lance.OpenDatasetBuilder.buildFromNamespace(OpenDatasetBuilder.java:200)
	at org.lance.OpenDatasetBuilder.build(OpenDatasetBuilder.java:186)
	at org.lance.spark.BaseLanceNamespaceSparkCatalog.loadTable(BaseLanceNamespaceSparkCatalog.java:373)
	at org.apache.spark.sql.connector.catalog.TableCatalog.loadTable(TableCatalog.java:130)
	at org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:592)
	at org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:575)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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.lang.Thread.run(Thread.java:748)

The root cause is as below:

image

@github-actions github-actions bot added the bug Something isn't working label Jan 12, 2026
@github-actions
Copy link
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@hfutatzhanghb hfutatzhanghb force-pushed the dev-zhb-fix-saveAsTable branch from 4f47e9d to fbb7012 Compare January 12, 2026 12:16
@hfutatzhanghb hfutatzhanghb changed the title fix: spark dataframe saveAsTable fails. fix: spark dataframe saveAsTable fails Jan 12, 2026
@hfutatzhanghb hfutatzhanghb force-pushed the dev-zhb-fix-saveAsTable branch 3 times, most recently from f3189ae to 86fbefb Compare January 12, 2026 13:07
@hfutatzhanghb
Copy link
Contributor Author

Hi, @jackye1995 @majin1102 . There is a compliation probrem due to the dependency of lance-namespace-core. We need at least lance-namespace-core:0.4.0 with class TableNotFoundException, but current latest lance-core version in maven rep is 2.0.0-beta.5 which depends on lance-namespace-core:0.3.1 。 Could you help update versions? Thanks a lot.

@hfutatzhanghb hfutatzhanghb force-pushed the dev-zhb-fix-saveAsTable branch from 86fbefb to f69434e Compare January 13, 2026 09:18
@hfutatzhanghb hfutatzhanghb force-pushed the dev-zhb-fix-saveAsTable branch from 766e46b to 1de12d7 Compare January 13, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant