siddharthteotia commented on a change in pull request #6710:
URL: https://github.com/apache/incubator-pinot/pull/6710#discussion_r603647761
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableBuilder.java
##########
@@ -91,9 +107,17 @@
private ByteBuffer _currentRowDataByteBuffer;
public DataTableBuilder(DataSchema dataSchema) {
+ CURRENT_VERSION = VERSION_3;
Review comment:
This doesn't look clean. CURRENT_VERSION should not be assigned in the
constructor. It is a static final set to the current version # (3 for this PR).
Have a variable **`private static int _version = VERSION_3`** and assign
that in the function **`setCurrentDataTableVersion(int version)`** so that it
can be overridden with the configured value.
Now in the builder, you check if _version is VERSION_2, call DataTableImplV2
else if _version is VERSION_3, call DataTableImplV3
This way you also remove CURRENT_VERSION and just keep VERSION_2, VERSION_3
and _version
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]