yifan-c commented on code in PR #116: URL: https://github.com/apache/cassandra-analytics/pull/116#discussion_r2180717481
########## cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java: ########## @@ -372,19 +372,33 @@ private void writeRow(Tuple2<DecoratedKey, Object[]> keyAndRowData, private Map<String, Object> getBindValuesForColumns(Map<String, Object> map, String[] columnNames, Object[] values) { Preconditions.checkArgument(values.length == columnNames.length, - "Number of values does not match the number of columns " + values.length + ", " + columnNames.length); + "Number of values does not match the number of columns " + values.length + ", " + columnNames.length); Review Comment: It is surprising if checkstyle is happy with this change. Basically, the parameters should align with the previous line. If the string is too long, you can break the string into multi-line. For this particular change, it does not seem to be relevant to the patch. Please revert. ########## cassandra-analytics-common/src/main/java/org/apache/cassandra/spark/data/CqlTable.java: ########## @@ -275,6 +275,37 @@ public boolean containsUdt(String fieldName) return columnsWithUdts.contains(fieldName); } + /** + * If a field is of type Tuple, or Tuple inside a frozen type, this function finds CqlTuple associated with that field + * @param fieldName name of the field + * @return CqlTuple associated with the requested field, returns null otherwise + */ + public CqlField.CqlTuple findTuple(String fieldName) Review Comment: nit: consider renaming to `findTupleInColumn`? The method is in `CqlTable`. It could be confusing to see `cqlTable.findTuple`. ########## cassandra-analytics-common/src/main/java/org/apache/cassandra/spark/data/CqlTable.java: ########## @@ -275,6 +275,37 @@ public boolean containsUdt(String fieldName) return columnsWithUdts.contains(fieldName); } + /** + * If a field is of type Tuple, or Tuple inside a frozen type, this function finds CqlTuple associated with that field Review Comment: Collection types and UDT can also contain `Tuple`, e.g. `tupleList tuples list<tuple<text, text>>`. The implementation does not currently consider those cases. Please also add test to cover the scenarios. -- 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: commits-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org