[ https://issues.apache.org/jira/browse/SPARK-33369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-33369. --------------------------------- Fix Version/s: 3.1.0 Resolution: Fixed Issue resolved by pull request 30273 [https://github.com/apache/spark/pull/30273] > Skip schema inference in DataframeWriter.save() if table provider supports > external metadata > -------------------------------------------------------------------------------------------- > > Key: SPARK-33369 > URL: https://issues.apache.org/jira/browse/SPARK-33369 > Project: Spark > Issue Type: New Feature > Components: SQL > Affects Versions: 3.1.0 > Reporter: Gengliang Wang > Assignee: Gengliang Wang > Priority: Major > Fix For: 3.1.0 > > > For all the v2 data sources which are not FileDataSourceV2, Spark always > infers the table schema/partitioning on DataframeWriter.save(). > The inference of table schema/partitioning can be expensive. However, there > is no such trait or flag for indicating a V2 source can use the input > DataFrame's schema on DataframeWriter.save(). We can resolve the problem by > adding a new expected behavior for the method > TableProvider.supportsExternalMetadata(): > When TableProvider.supportsExternalMetadata() is true, Spark will use the > input Dataframe's schema in DataframeWriter.save() and skip > schema/partitioning inference. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org