[
https://issues.apache.org/jira/browse/CALCITE-7360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18052252#comment-18052252
]
Zhen Chen commented on CALCITE-7360:
------------------------------------
Actually, I think implementing it according to Rust's specifications is fine; I
don't have a strong preference. As long as the specifications are clear, that's
fine. I've roughly looked at the PR and tested scenarios like 2.3 - CAST(1 AS
UNSIGNED INTEGER) in MySQL and DockDB. Is this something we're planning to
implement later, or is this type inference already implemented?
> The meaning of negation for unsigned numbers is not defined
> -----------------------------------------------------------
>
> Key: CALCITE-7360
> URL: https://issues.apache.org/jira/browse/CALCITE-7360
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.41.0
> Reporter: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
>
> Some time ago unsigned integer types were introduced in Calcite.
> They allow all arithmetic operations as signed types.
> However, the meaning of negation is not defined. Using negation in a quidem
> test causes an exception, since the implementation is incorrect.
> Questions:
> * Should negation be allowed at all?
> * Should it coerce the value to a larger integer type?
> * Or should it work as in C?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)