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

[GitHub] [arrow-rs] izveigor opened a new issue, #4083: Support dyn_compare_scalar for Decimal256

izveigor opened a new issue, #4083:
URL: https://github.com/apache/arrow-rs/issues/4083

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   Like Decimal128Array, I think Decimal256Array should be also compared with a scalar.
   ```
   use arrow::array::{Decimal128Array, Decimal256Array};
   use arrow::compute::kernels::comparison::eq_dyn_scalar;
   use arrow::datatypes::i256;
   
   
   fn main() {
       let decimal128_array = Decimal128Array::from(vec![1_i128, 2_i128, 3_i128]);
       let decimal256_array = Decimal256Array::from(vec![i256::from_i128(1), i256::from_i128(2), i256::from_i128(3)]);
       println!("{:#?}", eq_dyn_scalar(&decimal128_array, 2_i64)); // Ok
       println!("{:#?}", eq_dyn_scalar(&decimal256_array, 2_i64)); // Error
   }
   ```
   output:
   ```
   Ok(
       BooleanArray
       [
         false,
         true,
         false,
       ],
   )
   Err(
       ComputeError(
           "Unsupported data type Decimal256(76, 10) for comparison eq_scalar with 2",
       ),
   )
   ```
   Should be:
   output:
   ```
   Ok(
       BooleanArray
       [
         false,
         true,
         false,
       ],
   )
   Ok(
       BooleanArray
       [
         false,
         true,
         false,
       ],
   )
   ```
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
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-rs] tustvold closed issue #4083: Support dyn_compare_scalar for Decimal256

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #4083: Support dyn_compare_scalar for Decimal256
URL: https://github.com/apache/arrow-rs/issues/4083


-- 
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-rs] tustvold commented on issue #4083: Support dyn_compare_scalar for Decimal256

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #4083:
URL: https://github.com/apache/arrow-rs/issues/4083#issuecomment-1517889597

   `label_issue.py` automatically added labels {'arrow'} from #4084


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