ksbeyer commented on PR #51466:
URL: https://github.com/apache/spark/pull/51466#issuecomment-3105011643

   > @ksbeyer can we fix the issue by propagating the `metadata` from 
`InsertIntoHadoopFsRelationCommand.catalogTable.schema` to 
`FileFormatWriter.OutputSpec`? This can be a more general fix
   
   We could add an `tableSchema: Option[StructType]` to the OutputSpec.  To 
eliminate the option, I could make it be the table schema when the table is 
provided, else the data schema.
   
   The OutputSpec doesn't flow to the JacksonGenerator, however.  Could/should 
we change the dataSchema in FileFormatWriter.write to be the table schema (when 
provided) instead of the query schema?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to