You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/11/19 07:57:11 UTC

[GitHub] [arrow-datafusion] liukun4515 opened a new issue #1335: Error result type for ABS functions

liukun4515 opened a new issue #1335:
URL: https://github.com/apache/arrow-datafusion/issues/1335


   **Describe the bug**
   
   In the mysql and pg database, the result of `abs` function is long/bigint.
   
   But the result in the datafusion is 
   ```
   ❯ select ABS(-123);
   +--------------+
   | Float64(123) |
   +--------------+
   | 123          |
   +--------------+
   1 row in set. Query took 0.002 seconds.
   ```
   
   
   
   
   **To Reproduce**
   execute the sql
   ```
   select ABS(-12345);
   ```
   
   
   
   **Expected behavior**
   the result type should be the int64 or bigint.
   
   ❯ select ABS(-12345);
   +----------------+
   | Int64(12345) |
   +----------------+
   | 12345          |
   +----------------+
   
   **Additional context**
   
   


-- 
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] liukun4515 commented on issue #1335: Error result type for ABS functions

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #1335:
URL: https://github.com/apache/arrow-datafusion/issues/1335#issuecomment-973841864


   Please assign this issue to me.


-- 
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] liukun4515 removed a comment on issue #1335: Error result type for ABS functions

Posted by GitBox <gi...@apache.org>.
liukun4515 removed a comment on issue #1335:
URL: https://github.com/apache/arrow-datafusion/issues/1335#issuecomment-975197151


   After survey, in the PG, we can use the function ob ABS to INT,BIGINT,FLOAT,DOUBLE,VARCHAR,DECIMAL and other datatype. The result type is complex, Maybe other mathematical functions also have the same issue.
   I will give a general solution to resolve it.


-- 
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] liukun4515 commented on issue #1335: Error result type for ABS functions

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #1335:
URL: https://github.com/apache/arrow-datafusion/issues/1335#issuecomment-975197151


   After survey, in the PG, we can use the function ob ABS to INT,BIGINT,FLOAT,DOUBLE,VARCHAR,DECIMAL and other datatype. The result type is complex, Maybe other mathematical functions also have the same issue.
   I will give a general solution to resolve it.


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