mcvsubbu commented on a change in pull request #3624: [PINOT-7370] Return
number of bytes read from the reader interfaces/implementations
URL: https://github.com/apache/incubator-pinot/pull/3624#discussion_r244791324
##########
File path:
pinot-core/src/main/java/com/linkedin/pinot/core/segment/index/readers/BaseDictionary.java
##########
@@ -54,50 +54,62 @@ public String getStringValue(int dictId) {
}
@Override
- public void readIntValues(int[] dictIds, int inStartPos, int length, int[]
outValues, int outStartPos) {
+ public long readIntValues(int[] dictIds, int inStartPos, int length, int[]
outValues, int outStartPos) {
int inEndPos = inStartPos + length;
for (int i = inStartPos; i < inEndPos; i++) {
outValues[outStartPos++] = getIntValue(dictIds[i]);
}
+ return length * Integer.BYTES;
}
@Override
- public void readLongValues(int[] dictIds, int inStartPos, int length, long[]
outValues, int outStartPos) {
+ public long readLongValues(int[] dictIds, int inStartPos, int length, long[]
outValues, int outStartPos) {
int inEndPos = inStartPos + length;
for (int i = inStartPos; i < inEndPos; i++) {
outValues[outStartPos++] = getLongValue(dictIds[i]);
}
+ return length * Long.BYTES;
}
@Override
- public void readFloatValues(int[] dictIds, int inStartPos, int length,
float[] outValues, int outStartPos) {
+ public long readFloatValues(int[] dictIds, int inStartPos, int length,
float[] outValues, int outStartPos) {
int inEndPos = inStartPos + length;
for (int i = inStartPos; i < inEndPos; i++) {
outValues[outStartPos++] = getFloatValue(dictIds[i]);
}
+ return length * Float.BYTES;
}
@Override
- public void readDoubleValues(int[] dictIds, int inStartPos, int length,
double[] outValues, int outStartPos) {
+ public long readDoubleValues(int[] dictIds, int inStartPos, int length,
double[] outValues, int outStartPos) {
int inEndPos = inStartPos + length;
for (int i = inStartPos; i < inEndPos; i++) {
outValues[outStartPos++] = getDoubleValue(dictIds[i]);
}
+ return length * Double.BYTES;
}
@Override
- public void readStringValues(int[] dictIds, int inStartPos, int length,
String[] outValues, int outStartPos) {
+ public long readStringValues(int[] dictIds, int inStartPos, int length,
String[] outValues, int outStartPos) {
+ long bytesRead = 0;
int inEndPos = inStartPos + length;
for (int i = inStartPos; i < inEndPos; i++) {
- outValues[outStartPos++] = getStringValue(dictIds[i]);
+ String str = getStringValue(dictIds[i]);
Review comment:
Same comment as before
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]