Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5964#discussion_r188722661
  
    --- Diff: 
flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java
 ---
    @@ -381,6 +393,9 @@ protected void sanityCheck() {
                        if (query == null || query.length() == 0) {
                                throw new IllegalArgumentException("Query must 
not be null or empty.");
                        }
    +                   if (keyspace != null && keyspace.length() != 0) {
    --- End diff --
    
    we eagerly check for empty strings for the query since that will definitely 
fail later on, since an empty query doesn't make sense.
    
    The check here is to prevent non-pojo sinks to be configured with 
pojo-specific options. An empty keyspace _should_ throw an exception in this 
case, as the method isn't even supposed to be used.


---

Reply via email to