andygrove commented on issue #38:
URL: 
https://github.com/apache/datafusion-iceberg/issues/38#issuecomment-5934703758

   Folding #43 into this issue, since the fix overlaps.
   
   With `write.datafusion.fanout.enabled=false`, unpartitioned tables fail too, 
earlier: `insert_into` calls `sort_by_partition` unconditionally, and 
unpartitioned inputs have no `_partition` column.
   
   ```sql
   -- t(id INT NOT NULL), unpartitioned, with table property 
write.datafusion.fanout.enabled=false
   INSERT INTO t VALUES (1);
   ```
   
   ```
   Error during planning: Partition column '_partition' not found in schema. 
Ensure the plan has been extended with partition values using 
project_with_partition.
   ```
   
   Once `IcebergWriteExec` declares the ordering requirement, the manual 
`sort_by_partition` call in `insert_into` can go, which removes this failure 
too. The requirement should only be declared for partitioned tables with fanout 
disabled. A test that inserts into an unpartitioned table with the property set 
would cover it.
   


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