Hi houyin,
> It maybe because the conditions in where clause, being pushed down as  a 
> predicate
into join clause ?
Yes, after pushdown, hbase lookupkeys are `rowKey` and `city_code`, which
trigger above exception.
> How can I solve this problem ?
Because only constant value and field input ref only be parsed as
LookupKey, you could add some operation on t2.city_code, for example update
`AND t1.city_code = t2.city_code` to `AND UPPER(t1.city_code) =
UPPER(t2.city_code)
` or `AND CAST(t1.city_code AS VARCHAR) = CAST(t2.city_code AS VARCHAR) `

Best regards,
JING ZHANG

纳兰清风 <houying910...@163.com> 于2021年6月28日周一 下午12:48写道:

> Hi,
>
>   When I was using hbase table as my lookup table, I got this error:
>
>     Caused by: java.lang.IllegalArgumentException: Currently, HBase table
> can only be lookup by single row key.
>     at
> org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:138)
>
> My SQL is
>
> insert into sink_kafka(user_ucid,city_code,`source`,system_type)
> SELECT t1.ucid AS user_ucid,
>      t1.city_code,
>      t1.`source`,
>      t1.system_type
> FROM tmp_ucid_check t1
> LEFT JOIN dim_hbase_valid_im_commercial_cust_di_cache
> for SYSTEM_TIME AS OF t1.proctime AS t2
> ON concat(t1.ucid,'&',t1.city_code) = t2.rowKey
> WHERE t2.city_code is NOT null
> AND t1.city_code = t2.city_code;
>
> It maybe because the conditions in where clause, being pushed down as  a 
> predicate
> into join clause ?
> How can I solve this problem ?
>
> Thank you
>
>
>
>

Reply via email to