FlinkSQL创建view无法指定hints,请问是社区不支持吗?
FLink的版本是flink-1.11.0
前提:返合FLINK-18750和FLINK-20200 issue
SQL: CREATE VIEW if not exists view_lh_321 as SELECT id, name " + "FROM kafkaTable_20220125 /*+ OPTIONS('properties.group.id'='BD_hsj') */"
社区提供了Flink-20200解决这个异常的方案,但是issue返合后,发现还是无法指定Options参数。
同时,如果在创建view中,不指定options参数,sql能正常运行
在FLINK-20200 issue返合以后,在执行上述的sql执行,仍出现下面异: java.lang.UnsupportedOperationException: class org.apache.calcite.sql.SqlSyntax$6: SPECIAL at org.apache.calcite.util.Util.needToImplement(Util.java:967) at org.apache.calcite.sql.SqlSyntax$6.unparse(SqlSyntax.java:116) at org.apache.calcite.sql.SqlOperator.unparse(SqlOperator.java:333) at org.apache.calcite.sql.SqlDialect.unparseCall(SqlDialect.java:470) at org.apache.calcite.sql.SqlCall.unparse(SqlCall.java:101) at org.apache.calcite.sql.SqlSelectOperator.unparse(SqlSelectOperator.java:176) at org.apache.calcite.sql.SqlDialect.unparseCall(SqlDialect.java:470) at org.apache.calcite.sql.SqlSelect.unparse(SqlSelect.java:246) at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:151) at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:173) at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:182) at org.apache.flink.table.planner.operations.SqlToOperationConverter.getQuotedSqlString(SqlToOperationConverter.java:1164) at org.apache.flink.table.planner.utils.Expander$Expanded.substitute(Expander.java:183) at org.apache.flink.table.planner.operations.SqlToOperationConverter.convertViewQuery(SqlToOperationConverter.java:1074) at org.apache.flink.table.planner.operations.SqlToOperationConverter.convertCreateView(SqlToOperationConverter.java:1043) at org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:298) at org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:112) at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:693) at testViewCannotCreate4.main(testViewCannotCreate4.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:288) ... 11 more
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。