Martijn Visser created FLINK-41537:
--------------------------------------

             Summary: CassandraSource can fail on tables with a composite or 
case-sensitive partition key
                 Key: FLINK-41537
                 URL: https://issues.apache.org/jira/browse/FLINK-41537
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Cassandra
            Reporter: Martijn Visser


The source builds {{token(...)}} over the partition key columns. Since 
FLINK-38042 the columns are collected into a {{HashSet}}, so a composite key 
can come out in the wrong order, and case-sensitive names have never been 
quoted. Both make the read fail:

  * {{PRIMARY KEY ((z_key, a_key))}}: {{InvalidQueryException: The token 
function arguments must be in the partition key order: z_key, a_key}}
  * {{"MyKey" int PRIMARY KEY}}: {{InvalidQueryException: Undefined column name 
mykey in table flink.pk_quoted}}

  Through SQL the select list is built from unquoted field names as well, so a 
case-sensitive column fails there too ({{Undefined column name mykey}} on a 
Flink 2.3 cluster).

  Reproduced on main (3146c5b) against Cassandra 4.1.12. The PR for FLINK-41444 
fixes both on driver 4, but the fix needs its own commit for v3.3.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to