|
Hi:
我用Table API创建了一张表,表字段如下:
key:FLOAT,
col1: FLOAT,
col2: FLOAT,
col3: FLOAT
使用如下SQL进行查询:
select * from flink where
(key < 5)
or
((key > 10 and key < 12)
or
(key in (15, 16, 17)) or (key > 18 and key <= 19))
执行时报了如下错误:
Exception in thread "main" java.lang.UnsupportedOperationException: class org.apache.calcite.sql.type.SqlTypeName: FLOAT
at org.apache.calcite.util.Util.needToImplement(Util.java:1075)
at org.apache.calcite.rex.RexLiteral.appendAsJava(RexLiteral.java:703)
at org.apache.calcite.rex.RexLiteral.toJavaString(RexLiteral.java:408)
at org.apache.calcite.rex.RexLiteral.computeDigest(RexLiteral.java:276)
at org.apache.calcite.rex.RexLiteral.<init>(RexLiteral.java:223)
at org.apache.calcite.rex.RexLiteral.toLiteral(RexLiteral.java:737)
at org.apache.calcite.rex.RexLiteral.lambda$printSarg$4(RexLiteral.java:710)
at org.apache.calcite.util.RangeSets$Printer.lessThan(RangeSets.java:392)
at org.apache.calcite.util.RangeSets.forEach(RangeSets.java:253)
at org.apache.calcite.util.Sarg.lambda$printTo$0(Sarg.java:110)
at org.apache.calcite.linq4j.Ord.forEach(Ord.java:157)
at org.apache.calcite.util.Sarg.printTo(Sarg.java:106)
at org.apache.calcite.rex.RexLiteral.printSarg(RexLiteral.java:709)
at org.apache.calcite.rex.RexLiteral.lambda$appendAsJava$1(RexLiteral.java:652)
at org.apache.calcite.util.Util.asStringBuilder(Util.java:2502)
at org.apache.calcite.rex.RexLiteral.appendAsJava(RexLiteral.java:651)
at org.apache.calcite.rex.RexLiteral.toJavaString(RexLiteral.java:408)
at org.apache.calcite.rex.RexLiteral.computeDigest(RexLiteral.java:276)
at org.apache.calcite.rex.RexLiteral.<init>(RexLiteral.java:223)
at org.apache.calcite.rex.RexBuilder.makeLiteral(RexBuilder.java:971)
麻烦问一下,这是什么原因?定义字段时不能用Float吗?如果不能用,假如我的source或者sink需要是Float类型,怎么处理?望知道的大佬告知,感谢。
祝好!
automths
|