Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/13756
I'm thinking about if it's possible to concentrate error checking logics at
one place for table creation. For example, we check duplicated table column
names at parser for SQL
statement(https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L918),
at command for
`DataFrameWriter`(https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala#L77).
And some checks are only valid for SQL statement, e.g.
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L925
It will be good if we can abstract the common pattern and put all error
checking logic together, and have a individual test suite to test it.
---
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]