[
https://issues.apache.org/jira/browse/FLINK-41252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-41252:
-----------------------------------
Labels: pull-request-available (was: )
> flink-sql-connector-kudu fails with "Invalid lambda deserialization" for
> tables with a primary key
> --------------------------------------------------------------------------------------------------
>
> Key: FLINK-41252
> URL: https://issues.apache.org/jira/browse/FLINK-41252
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Kudu
> Affects Versions: kudu-2.0.0
> Environment: * *flink-sql-connector-kudu 2.0.0-1.19 and 2.0.0-1.20
> (also main @ 3a4df68)*
> * *Apache Flink 1.19.1, SQL Client (embedded) on a YARN session*
> * *Apache Kudu 1.17.0 (1 master, 1 tablet server)*
> * *Java 17 (OpenJDK 17.0.20), Rocky Linux 8.10*
> * *maven-shade-plugin 3.5.1 (relocation org.apache.kudu ->
> org.apache.flink.kudu.shaded.org.apache.kudu)*
>
> Reporter: Harsh Mishra
> Priority: Major
> Labels: pull-request-available
> Fix For: kudu-2.1.0
>
>
> *Cause:*
> The SQL uber-jar relocates *_org.apache.kudu_* to
> {_}*org.apache.flink.kudu.shaded.org.apache.kudu*{_}.
> _*KuduTableUtils#createTableInfo*_ creates a serializable lambda
> *_(CreateTableOptionsFactory)_* whose return type is a Kudu class.
> maven-shade rewrites the lambda's implementation signature but not the
> signature string checked in {*}_$deserializeLambda$_{*}, so deserialization
> fails with *_{color:#de350b}IllegalArgumentException: Invalid lambda
> deserialization.
> {color}_*
> It reproduces with any *_CREATE TABLE ... PRIMARY KEY ... WITH
> ('connector'='kudu')_* followed by *_SELECT or INSERT_* using
> flink-sql-connector-kudu.
> *Steps to reproduce (flink-sql-connector-kudu in $FLINK_HOME/lib, SQL
> Client):*
> {code:java}
> CREATE TABLE kudu_users (
>
>
> id BIGINT, name STRING, age INT,
>
>
> PRIMARY KEY (id) NOT ENFORCED
>
>
> ) WITH (
>
>
> 'connector' = 'kudu',
>
>
> 'masters' = '<kudu-master>:7051',
>
>
> 'table-name' = 'flink_kudu_test',
>
>
> 'hash-columns' = 'id',
>
>
> 'replicas' = '1'
>
>
> );
>
>
> SELECT * FROM kudu_users;
> [ERROR] Could not execute SQL statement. Reason:
>
> java.lang.IllegalArgumentException: Invalid lambda deserialization {code}
> *Proposed fix:* "Replace the serializable lambdas in
> *KuduTableUtils#createTableInfo* with named serializable classes. Workaround:
> declare the table without a primary key and
> create it in Kudu beforehand." **
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)