[ 
https://issues.apache.org/jira/browse/FLINK-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327535#comment-15327535
 ] 

ASF GitHub Bot commented on FLINK-3859:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2088#discussion_r66805682
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/codegen/calls/ScalarOperators.scala
 ---
    @@ -122,14 +125,14 @@ object ScalarOperators {
           right: GeneratedExpression)
         : GeneratedExpression = {
         generateOperatorIfNotNull(nullCheck, BOOLEAN_TYPE_INFO, left, right) {
    -      if (isString(left) && isString(right)) {
    +      if (isReference(left) && isReference(right)) {
             (leftTerm, rightTerm) => s"$leftTerm.compareTo($rightTerm) 
$operator 0"
           }
    -      else if (isNumeric(left) && isNumeric(right)) {
    +      else if (isNumeric(left.resultType) && isNumeric(right.resultType)) {
    --- End diff --
    
    If `left` or `right` is a `BigDecimal` invalid code is generated. 
    
    > Caused by: org.codehaus.commons.compiler.CompileException: Line 64, 
Column 0: Cannot compare types "int" and "java.math.BigDecimal"
    
    This happens if you replace the query in 
`FilterITCase.testFilterOnInteger()` by `SELECT * FROM MyTable WHERE a < 4.25`. 
`MyTable.a` is an `INTEGER` column and not auto-casted to `DECIMAL`. 
Auto-casting seems to work for expressions in the `SELECT` clause.


> Add BigDecimal/BigInteger support to Table API
> ----------------------------------------------
>
>                 Key: FLINK-3859
>                 URL: https://issues.apache.org/jira/browse/FLINK-3859
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>            Priority: Critical
>
> Since FLINK-3786 has been solved, we can now start integrating 
> BigDecimal/BigInteger into the Table API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to