I am looking this issue, the related codes which throw errors are:

    SinkCodeGenerator:: validateFieldType()

    ...

     // Tuple/Case class/Row type requested
      case tt: TupleTypeInfoBase[_] =>
        fieldTypes.zipWithIndex foreach {
          case (fieldTypeInfo: GenericTypeInfo[_], i) =>
            val requestedTypeInfo = tt.getTypeAt(i)
            if (!requestedTypeInfo.isInstanceOf[GenericTypeInfo[Object]]) {
              throw new TableException(
                s"Result field '${fieldNames(i)}' does not match requested
type. " +
                    s"Requested: $requestedTypeInfo; Actual:
$fieldTypeInfo")
            }
          case (fieldTypeInfo, i) =>
            val requestedTypeInfo = tt.getTypeAt(i)
            validateFieldType(requestedTypeInfo)
           * if (fromTypeInfoToLogicalType(fieldTypeInfo) !=*
*                fromTypeInfoToLogicalType(requestedTypeInfo) &&*
*                !requestedTypeInfo.isInstanceOf[GenericTypeInfo[Object]])
{*
*              val fieldNames = tt.getFieldNames*
*              throw new TableException(s"Result field '${fieldNames(i)}'
does not match requested" +*
*                  s" type. Requested: $requestedTypeInfo; Actual:
$fieldTypeInfo")*
*            }*
        }
   ...

Thanks,
Frank

kaka chen <kaka11.c...@gmail.com> 于2019年7月16日周二 下午5:23写道:

> Hi All,
>
>
> We are trying to switch to blink table planner in HBase connector, which
> found the following error:
>
>
> Running org.apache.flink.addons.hbase.HBaseSinkITCase
>
> Formatting using clusterid: testClusterID
>
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 28.042 sec
> <<< FAILURE! - in org.apache.flink.addons.hbase.HBaseSinkITCase
>
> testTableSink(org.apache.flink.addons.hbase.HBaseSinkITCase)  Time
> elapsed: 2.431 sec  <<< ERROR!
>
> org.apache.flink.table.api.TableException: Result field 'family1' does not
> match requested type. Requested: Row(col1: Integer); Actual: Row(EXPR$0:
> Integer)
>
> at
> org.apache.flink.addons.hbase.HBaseSinkITCase.testTableSink(HBaseSinkITCase.java:140)
>
>
> The original flink table planner executed successfully.
>
>
> Thanks,
>
> Kaka Chen
>

Reply via email to