You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "dust1 (via GitHub)" <gi...@apache.org> on 2023/04/04 06:35:16 UTC

[GitHub] [arrow-datafusion] dust1 opened a new issue, #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

dust1 opened a new issue, #5857:
URL: https://github.com/apache/arrow-datafusion/issues/5857

   ### Describe the bug
   
   When I was in use date_bin functions, it needs to be the result of milliseconds. I try to use this method for the following transformations:
   ```rust
           let arrow_record_batch: ArrowRecordBatch = ....;
           let columns = arrow_record_batch.columns();
           let nanosecond_columns = ColumnarValue::Array(columns[0].clone());
           let millis_columns = to_timestamp_millis(&[nanosecond_columns ]);
           match result {
               Ok(m) => {
                   println!("cast ok:{:?}", m);
               },
               Err(e) => {
                   println!("cast fail:{}", e);
               }
           };
   ```
   the error info is :
   ```
   cast fail:Internal error: Unsupported data type Timestamp(Nanosecond, None) for function to_timestamp_millis. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
   ```
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   the type cast was ok
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] dust1 closed issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

Posted by "dust1 (via GitHub)" <gi...@apache.org>.
dust1 closed issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis`  Unsupported data type Timestamp(Nanosecond, None)
URL: https://github.com/apache/arrow-datafusion/issues/5857


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] waitingkuo commented on issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

Posted by "waitingkuo (via GitHub)" <gi...@apache.org>.
waitingkuo commented on issue #5857:
URL: https://github.com/apache/arrow-datafusion/issues/5857#issuecomment-1500105787

   @dust1 
   
   perhaps you could use `cast_column`
   https://github.com/apache/arrow-datafusion/blob/e41711b29e72f2d9a8a25c1ed00ccf3ed369f3bc/datafusion/physical-expr/src/functions.rs#L91-L109


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] comphead commented on issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on issue #5857:
URL: https://github.com/apache/arrow-datafusion/issues/5857#issuecomment-1497920630

   Probably the field type was another. `to_timestamp_millis ` supports the cast from Utf8/LargeUtf8


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] waitingkuo commented on issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

Posted by "waitingkuo (via GitHub)" <gi...@apache.org>.
waitingkuo commented on issue #5857:
URL: https://github.com/apache/arrow-datafusion/issues/5857#issuecomment-1500031937

   https://github.com/apache/arrow-datafusion/blob/6d1ec7ae22fd2181be32d18a4a269777755ae9b1/datafusion/physical-expr/src/datetime_expressions.rs#L138-L145
   
   `to_timestamp_millis` uses `string_to_timestamp_nanos_shim` which only accept `&str` as input


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] dust1 commented on issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

Posted by "dust1 (via GitHub)" <gi...@apache.org>.
dust1 commented on issue #5857:
URL: https://github.com/apache/arrow-datafusion/issues/5857#issuecomment-1500108687

   That's just what I wanted. Thank you!!! @waitingkuo 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] dust1 commented on issue #5857: `datafusion::physical_expr::datetime_expressions::to_timestamp_millisto_timestamp_millis` Unsupported data type Timestamp(Nanosecond, None)

Posted by "dust1 (via GitHub)" <gi...@apache.org>.
dust1 commented on issue #5857:
URL: https://github.com/apache/arrow-datafusion/issues/5857#issuecomment-1500042854

   Thank you very much two answer, I now through ` TimestampMillisecondBuilder ` for type conversion, maybe I can try to assemble it for Expr to invoke another ` to_timestamp_millis `


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org