alamb commented on issue #6492:
URL: 
https://github.com/apache/arrow-datafusion/issues/6492#issuecomment-1573999728

   I think the proper solution is to update the planner code to project (e.g. 
with a `LogicalPlan::Projection`) the output of the query into the types of the 
target table 
   
   In the example 
https://github.com/apache/arrow-datafusion/issues/6492#issuecomment-1573076672 
from @byteink  the table's schema says "it can't have nulls" (because it is 
marked as non-nullable) so in my opinion DataFusion is correctly rejecting this 
plan
   
   I think this was not previously a problem because MemoryTables could not be 
updated so if the initial contents didn't contain nulls, they never would 
contain nulls (and thus that could be reflected in the schema)
   
   Now that we an add new data to MemTables, what do you think about ensuring 
the schema of the MemTable when created via `INSERT ...` is nullable?
   


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

Reply via email to