siddharthteotia commented on a change in pull request #4876: Capture the exact
UPDATE operation in DefaultColumnHandler
URL: https://github.com/apache/incubator-pinot/pull/4876#discussion_r352911301
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java
##########
@@ -188,13 +197,22 @@ public void updateDefaultColumns()
defaultValueInSchema =
fieldSpecInSchema.getDefaultNullValue().toString();
}
- if (dataTypeInMetadata != dataTypeInSchema || isSingleValueInMetadata
!= isSingleValueInSchema
- || !defaultValueInSchema.equals(defaultValueInMetadata)) {
- if (fieldTypeInMetadata == FieldSpec.FieldType.DIMENSION) {
- defaultColumnActionMap.put(column,
DefaultColumnAction.UPDATE_DIMENSION);
- } else {
- Preconditions.checkState(fieldTypeInMetadata ==
FieldSpec.FieldType.METRIC);
- defaultColumnActionMap.put(column,
DefaultColumnAction.UPDATE_METRIC);
+ if (fieldTypeInMetadata == FieldSpec.FieldType.DIMENSION) {
+ if (dataTypeInMetadata != dataTypeInSchema) {
+ defaultColumnActionMap.put(column,
DefaultColumnAction.UPDATE_DIMENSION_DATA_TYPE);
Review comment:
We aren't allowing incompatible schema operations. This behavior doesn't
change any behavior. It's just that exact nature of UPDATE operation is
captured.
I think you are suggesting to throw exception for remove and update here
itself in BaseDefaultColumnHandler when we compute the default column action. I
don't think that can be done since for V1 we sill allow update/remove
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]