echauchot commented on code in PR #33: URL: https://github.com/apache/flink-connector-cassandra/pull/33#discussion_r2137609420
########## flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/source/reader/CassandraQueryTest.java: ########## @@ -39,7 +39,8 @@ public void testKeySpaceTableExtractionRegexp() { "select field1, field2 from keyspace.table;", "select field1, field2 from keyspace.table LIMIT(1000);", "select field1 from keyspace.table ;", - "select field1 from keyspace.table where field1=1;") + "select field1 from keyspace.table where field1=1;", + "select field1 from keyspace.table where field1_with_minimum_word=1;") Review Comment: This test case is for keySpace and table name extraction. I'd rather like that you enhance the testProhibitedClauses test case by adding passing test cases there for newly accepted queries: - field name containing aggregation - table name containing aggregation ########## flink-connector-cassandra/src/main/java/org/apache/flink/connector/cassandra/source/CassandraSource.java: ########## @@ -90,7 +90,8 @@ public class CassandraSource<OUT> implements Source<OUT, CassandraSplit, CassandraEnumeratorState>, ResultTypeQueryable<OUT> { public static final Pattern CQL_PROHIBITED_CLAUSES_REGEXP = - Pattern.compile("(?i).*(AVG|COUNT|MIN|MAX|SUM|ORDER BY|GROUP BY).*"); + Pattern.compile( + "(?i).*(AVG\\(|COUNT\\(|MIN\\(|MAX\\(|SUM\\(|ORDER BY\\s|GROUP BY\\s).*"); Review Comment: This is stricter regexpr that avoids false positives. Thanks for this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org