egalpin commented on code in PR #10234:
URL: https://github.com/apache/pinot/pull/10234#discussion_r1120890410
##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/UpsertConfig.java:
##########
@@ -154,10 +135,22 @@ public void setDefaultPartialUpsertStrategy(Strategy
defaultPartialUpsertStrateg
* same primary key, the record with the larger value of the time column is
picked as the
* latest update.
* However, there are cases when users need to use another column to
determine the order.
- * In such case, you can use option comparisonColumn to override the column
used for comparison.
+ * In such case, you can use option comparisonColumn to override the column
used for comparison. When using
+ * multiple comparison columns, typically in the case of partial upserts, it
is expected that input documents will
+ * each only have a singular non-null comparisonColumn. Multiple non-null
values in an input document _will_ result
+ * in undefined behaviour. Typically, one comparisonColumn is allocated per
distinct producer application of data
+ * in the case where there are multiple producers sinking to the same table.
*/
+ public void setComparisonColumns(List<String> comparisonColumns) {
Review Comment:
Added, but in its current for it implies that calling this setter more than
once will cause a run time error. Is that acceptable, or better to overwrite?
If we remove these checks, then if an upsert config includes both
`comparisonColumn` and `comparisonColumns`, whichever is specified last will
overwrite the one specified first.
--
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]