bbotella commented on code in PR #256:
URL:
https://github.com/apache/cassandra-analytics/pull/256#discussion_r4468972136
##########
cassandra-four-zero-bridge/src/main/java/org/apache/cassandra/cdc/msg/FourZeroCdcEventBuilder.java:
##########
@@ -253,9 +256,20 @@ private void processComplexData(List<Value> holder,
ComplexColumnData complex)
AbstractComplexTypeBuffer buffer =
AbstractComplexTypeBuffer.newBuffer(complex.column().type,
complex.cellsCount());
boolean allTombstone = true;
String columnName = complex.column().name.toCQLString();
+ UserType udt = complex.column().type instanceof UserType ? (UserType)
complex.column().type : null;
+ // Without a complex deletion, the UDT is partially updated and only
the fields with a cell are written
+ boolean isUdtPartialUpdate = udt != null &&
complex.complexDeletion().isLive();
for (Cell<?> cell : complex)
{
updateMaxTimestamp(cell.timestamp());
+ if (isUdtPartialUpdate)
+ {
+ int position = UdtBuffer.fieldPosition(cell, udt.size());
+ if (position >= 0)
Review Comment:
What would happen here right after an alter table to add a field to an UDT,
an update comes for that field before the CDC schema has been refreshed in the
metadata?
I think that new field would be ignored on the CDC event?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]