krishna-prasad-s commented on issue #7564:
URL:
https://github.com/apache/arrow-datafusion/issues/7564#issuecomment-1729079889
Hi ,
I tried casting in `df.select`.
` let mut cast_df = df.select(fix_timestamp_to_micro(&sel_schema)).unwrap();`
and in the function.
```
fn fix_timestamp_to_micro(data_schema: &DFSchema) -> Vec<Expr> {
let mut exprs : Vec<Expr> = Vec::new();
for column in data_schema.fields() {
if column.data_type() == &DataType::Timestamp(TimeUnit::Nanosecond,
None) || column.data_type() == &DataType::Timestamp(TimeUnit::Microsecond,
None) {
let mut c = col(column.name());
let cast_expr = c.cast_to(
&DataType::Timestamp(TimeUnit::Microsecond, None), data_schema).unwrap();
exprs.push(cast_expr);
} else {
exprs.push(col(column.name()));
}
}
exprs
}
```
It didn't work. What I was also trying was to see if If I could place a
break point in delta-rs when the collect happened. What I tried to see was if
datafusion hit any delta-rs function when doing collect. I could not find any.
--
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]