You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "yifan-c (via GitHub)" <gi...@apache.org> on 2024/08/15 19:10:17 UTC
[PR] CASSANDRA-19836: Fix NPE when writing UDT values [cassandra-analytics]
yifan-c opened a new pull request, #74:
URL: https://github.com/apache/cassandra-analytics/pull/74
When UDT field values are set to null, the bulk writer throws NPE
Patch by Yifan Cai; Reviewed by TBD for CASSANDRA-19836
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
Re: [PR] CASSANDRA-19836: Fix NPE when writing UDT values [cassandra-analytics]
Posted by "yifan-c (via GitHub)" <gi...@apache.org>.
yifan-c merged PR #74:
URL: https://github.com/apache/cassandra-analytics/pull/74
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
Re: [PR] CASSANDRA-19836: Fix NPE when writing UDT values [cassandra-analytics]
Posted by "JeetKunDoug (via GitHub)" <gi...@apache.org>.
JeetKunDoug commented on code in PR #74:
URL: https://github.com/apache/cassandra-analytics/pull/74#discussion_r1723555914
##########
cassandra-four-zero-types/src/main/java/org/apache/cassandra/spark/data/CqlType.java:
##########
@@ -106,12 +108,35 @@ public Object sparkSqlRowValue(Row row, int position)
throw CqlField.notImplemented(this);
}
- // Set inner value for UDTs or Tuples
- public void setInnerValue(SettableByIndexData<?> udtValue, int position, Object value)
+ /**
+ * Set inner value for UDTs or Tuples
+ * @param udtValue udtValue to update
+ * @param position position in the vdtValue to set
+ * @param value value to set; the value is guaranteed to not be null
+ */
+ protected void setInnerValue(SettableByIndexData<?> udtValue, int position, @NotNull Object value)
{
throw CqlField.notImplemented(this);
}
+ /**
+ * Set nullable inner value at the position for UDTs or Tuples
+ * @param udtValue udtValue to update
+ * @param position position in the vdtValue to set
+ * @param value nullable value to set
+ */
+ public final void setNullableInnerValue(SettableByIndexData<?> udtValue, int position, @Nullable Object value)
Review Comment:
NIT: I'd actually rename the original `setInnerValue` to `setInnerValueInternal` and keep this one called `setInnerValue`.
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org