Github user gatorsmile commented on the issue:
https://github.com/apache/spark/pull/17289
This is the design decision we need to make here.
Spark SQL is kind of a federation system. Two write APIs behave
differently. The `saveAsTable` API expects users to register it in the **global
catalog** before usage. The `save` API skips the global catalog and relies on
the connectors to communicate with the **local catalog**. The users might not
realize the difference.
```Scala
df.write.format("xyz").mode(SaveMode.ErrorIfExists)
.saveAsTable("j1")
```
```Scala
df.write.format("xyz").mode(SaveMode.ErrorIfExists)
.save()
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]