ankitsultana commented on code in PR #12222: URL: https://github.com/apache/pinot/pull/12222#discussion_r1446620924
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java: ########## @@ -729,8 +729,11 @@ static void validateUpsertAndDedupConfig(TableConfig tableConfig, Schema schema) if (deleteRecordColumn != null) { FieldSpec fieldSpec = schema.getFieldSpecFor(deleteRecordColumn); Preconditions.checkState( - fieldSpec != null && fieldSpec.isSingleValueField() && fieldSpec.getDataType() == DataType.BOOLEAN, - "The delete record column must be a single-valued BOOLEAN column"); + fieldSpec != null && fieldSpec.isSingleValueField(), + "The delete record column must be a single-valued column"); + DataType dataType = fieldSpec.getDataType(); + Preconditions.checkState(dataType == DataType.BOOLEAN || dataType == DataType.STRING + || dataType.isNumeric(), "The delete record column must be of type: STRING / Boolean / numeric"); Review Comment: nit: consistent casing `String / Boolean / Numeric` ########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java: ########## @@ -729,8 +729,11 @@ static void validateUpsertAndDedupConfig(TableConfig tableConfig, Schema schema) if (deleteRecordColumn != null) { FieldSpec fieldSpec = schema.getFieldSpecFor(deleteRecordColumn); Preconditions.checkState( - fieldSpec != null && fieldSpec.isSingleValueField() && fieldSpec.getDataType() == DataType.BOOLEAN, - "The delete record column must be a single-valued BOOLEAN column"); + fieldSpec != null && fieldSpec.isSingleValueField(), + "The delete record column must be a single-valued column"); Review Comment: nit: if `fieldSpec == null`, then the user may have input a invalid column name. Can we explicitly convey that message back to them? (currently we will return that the column must be single-valued) -- 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...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org