adriangb commented on code in PR #18998:
URL: https://github.com/apache/datafusion/pull/18998#discussion_r2578276350


##########
datafusion/core/src/datasource/physical_plan/parquet.rs:
##########
@@ -1272,7 +1272,7 @@ mod tests {
             .round_trip_to_batches(vec![batch1, batch2])
             .await;
         assert_contains!(read.unwrap_err().to_string(),
-            "Cannot cast file schema field c3 of type Date64 to table schema 
field of type Int8");
+            "Cannot cast column 'c3' from 'Date64' (physical data type) to 
'Int8' (logical data type)");

Review Comment:
   I checked and I think this is right.
   
   From above:
   
   ```rust
   let batch2 = create_batch(vec![("c3", c4), ("c2", c2), ("c1", c1)]);
   ```
   
   And:
   
   ```rust
   let c4: ArrayRef = Arc::new(Date64Array::from(vec![
       Some(86400000),
       None,
       Some(259200000),
   ]));
   ```
   
   But in the schema:
   
   ```rust
   Field::new("c3", DataType::Int8, true)
   ```
   
   So in the physical data `c3` has the data type `Date64` and the logical type 
is `Int8`



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