metesynnada commented on code in PR #5606:
URL: https://github.com/apache/arrow-datafusion/pull/5606#discussion_r1138667303


##########
datafusion/core/src/datasource/memory.rs:
##########
@@ -170,13 +170,6 @@ impl TableProvider for MemTable {
         // Create a physical plan from the logical plan.
         let plan = state.create_physical_plan(input).await?;
 
-        // Check that the schema of the plan matches the schema of this table.

Review Comment:
   You should not delete this piece of code. Since you deleted it, you will not 
capture the errors if you change
   
   
https://github.com/apache/arrow-datafusion/blob/23814092bdd80533a5a673a5076d21125c8ef1e3/datafusion/core/tests/sqllogictests/test_files/ddl.slt#L442-L444
   
   into
   
   ```
   # Should create an empty table
   statement ok
   CREATE OR REPLACE TABLE table_without_values(field1 BIGINT, field2 BIGINT);
   ``` 
   which is the default behavior of PostgreSQL. Defensive coding might bring 
bugs to light.



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