skoppu22 commented on code in PR #109:
URL: 
https://github.com/apache/cassandra-analytics/pull/109#discussion_r2095806449


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java:
##########
@@ -380,28 +382,69 @@ private Map<String, Object> 
getBindValuesForColumns(Map<String, Object> map, Str
     {
         Preconditions.checkArgument(values.length == columnNames.length,
                                     "Number of values does not match the 
number of columns " + values.length + ", " + columnNames.length);
+
         for (int i = 0; i < columnNames.length; i++)
         {
-            map.put(columnNames[i], maybeConvertUdt(values[i]));
+            if (cqlTable().containsUdt(columnNames[i]))

Review Comment:
   cqlTable() already uses a class local variable `cqlTable`, populates it only 
once if it is not set and references the same in subsequent invocations. Using 
a local variable here in this caller only avoids the function call, but 
compiler must be smart enough to avoid subsequent calls I believe. Also 
`cqlTable` is volatile, there must be a reason for making it volatile, so 
better we reference the same. Infact we can reference that class local variable 
`cqlTable` directly here calling cqlTable(), but I would avoid that to be safe 
from future breaking changes if any.



-- 
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

Reply via email to