Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2792#discussion_r227807282
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
@@ -93,32 +92,10 @@ public T readNextRow() throws IOException,
InterruptedException {
}
/**
- * Read and return next string row object
- * limitation: only single dimension Array is supported
- * TODO: support didfferent data type
+ * Read and return next carbon row object
*/
- public Object[] readNextStringRow() throws IOException,
InterruptedException {
- validateReader();
- T t = currentReader.getCurrentValue();
- Object[] objects = (Object[]) t;
- String[] strings = new String[objects.length];
- for (int i = 0; i < objects.length; i++) {
- if (objects[i] instanceof Object[]) {
- Object[] arrayString = (Object[]) objects[i];
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(String.valueOf(arrayString[0]));
- if (arrayString.length > 1) {
- for (int j = 1; j < arrayString.length; j++) {
- stringBuffer.append(CarbonCommonConstants.ARRAY_SEPARATOR)
- .append(String.valueOf(arrayString[j]));
- }
- }
- strings[i] = stringBuffer.toString();
- } else {
- strings[i] = String.valueOf(objects[i]);
- }
- }
- return strings;
+ public Object[] readNextCarbonRow() throws IOException,
InterruptedException {
+ return (Object[]) readNextRow();
--- End diff --
ok, done
---