You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "INNOCENT-BOY (via GitHub)" <gi...@apache.org> on 2023/05/17 10:59:41 UTC

[GitHub] [pinot] INNOCENT-BOY commented on a diff in pull request #10759: bug fix: add @JsonProperty for variable _assignmentStrategy in SegmentAssignmentConfig

INNOCENT-BOY commented on code in PR #10759:
URL: https://github.com/apache/pinot/pull/10759#discussion_r1196314940


##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/assignment/SegmentAssignmentConfig.java:
##########
@@ -34,6 +34,7 @@ public SegmentAssignmentConfig(@JsonProperty(value = "segmentAssignmentStrategy"
     _assignmentStrategy = assignmentStrategy;
   }
 
+  @JsonProperty("segmentAssignmentStrategy")

Review Comment:
   Hi @gortiz , thank for your reply. 
   In my opinion, the first @JsonProperty is used for deserialization and this annotation is needed when you use @JsonCreator on constructor. but the second @JsonProperty is used to serialized.
   We can't put only one annotation on the attribute, because @JsonCreator need to together with annotation @JsonProperty.
   Last, this way is same like other json class, such as TableConfig (org.apache.pinot.spi.config.table.TableConfig)



-- 
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@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org