RussellSpitzer edited a comment on issue #2041: URL: https://github.com/apache/iceberg/issues/2041#issuecomment-761957601
This is actually Spark's defined behavior for insert into. https://github.com/apache/spark/blob/271c4f6e00b7bc7c47d84a8e59018e84a19c9822/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala#L442-L450 ``` * @note Unlike `saveAsTable`, `insertInto` ignores the column names and just uses position-based * resolution. For example: ``` Which I know is confusing, but you'll have to take it up with the Spark folks. The fix here is to make sure your "INSERT" query matches the column ordering as your base table. (Or use other APIs for writing which can align columns) Would be glad to know if anyone else has another workaround for this or has a correction ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
