[ https://issues.apache.org/jira/browse/FLINK-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327518#comment-15327518 ]
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_r66804568 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/codegen/CodeGenUtils.scala --- @@ -97,11 +97,26 @@ object CodeGenUtils { case _ => "null" } - def requireNumeric(genExpr: GeneratedExpression) = genExpr.resultType match { - case nti: NumericTypeInfo[_] => // ok - case _ => throw new CodeGenException("Numeric expression type expected.") + def superPrimitive(typeInfo: TypeInformation[_]): String = typeInfo match { + case _: FractionalTypeInfo[_] => "double" + case _ => "long" } + // ---------------------------------------------------------------------------------------------- + + def requireNumeric(genExpr: GeneratedExpression) = + if (!TypeCheckUtils.isNumeric(genExpr.resultType)) { + throw new CodeGenException("Numeric expression type expected, but was " + + s"'${genExpr.resultType}'") + } + + def requireNumericOrComparable(genExpr: GeneratedExpression) = --- End diff -- Rename to `requireComparable()`? > 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)