[
https://issues.apache.org/jira/browse/FLINK-22693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17348114#comment-17348114
]
sadfdddd commented on FLINK-22693:
----------------------------------
I guess from the error exception that the type does not match, so I made the
following attempt
To make the type match, I changed this class
org.apache.flink.table.planner.calcite.FlinkTypeFactory to let it return
StructKind.NONE ,but it didn't work
Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1,
column 60 to line 1, column 70: Cannot assign to target field 'f1' of type
RecordType(INTEGER name) from source field 'f1' of type RecordType(INTEGER
EXPR$0)Caused by: org.apache.calcite.runtime.CalciteContextException: From line
1, column 60 to line 1, column 70: Cannot assign to target field 'f1' of type
RecordType(INTEGER name) from source field 'f1' of type RecordType(INTEGER
EXPR$0) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at
org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:467) at
org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:883) at
org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:868) at
org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:5043)
at
org.apache.calcite.sql.validate.SqlValidatorImpl.checkTypeAssignment(SqlValidatorImpl.java:4714)
at
org.apache.calcite.sql.validate.SqlValidatorImpl.validateInsert(SqlValidatorImpl.java:4417)
at org.apache.calcite.sql.SqlInsert.validate(SqlInsert.java:158) at
org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:1016)
> EXPLAIN cannot be used on Hbase table when useing ROW type
> ----------------------------------------------------------
>
> Key: FLINK-22693
> URL: https://issues.apache.org/jira/browse/FLINK-22693
> Project: Flink
> Issue Type: Bug
> Components: Connectors / HBase, Table SQL / API
> Affects Versions: 1.12.2
> Reporter: sadfdddd
> Priority: Major
> Attachments: Driver.java, hbase.PNG, pom.xml
>
>
> We use ’EXPLAIN PLAN FOR‘ as a way of validating SQL
> calcite will no longer work and throw an exception when we sink to HBase
> table and use row type
> !hbase.PNG!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)