You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/07/09 17:08:45 UTC

[GitHub] [incubator-pinot] KKcorps commented on a change in pull request #5673: Fetch Columns and DataType from ResultSet

KKcorps commented on a change in pull request #5673:
URL: https://github.com/apache/incubator-pinot/pull/5673#discussion_r452366297



##########
File path: pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java
##########
@@ -61,6 +63,33 @@ public String getString(int rowIndex, int columnIndex) {
     }
   }
 
+  public List<String> getAllColumns() {
+    List<String> columns = new ArrayList<>();
+    if (_columnNamesArray == null) {
+      return columns;
+    }
+
+    for (JsonNode column : _columnNamesArray) {
+      columns.add(column.textValue());
+    }
+
+    return columns;
+  }
+
+
+  public List<String> getAllColumnsDataTypes() {
+    List<String> columnDataTypes = new ArrayList<>();
+    if (_columnDataTypesArray == null) {

Review comment:
       It is just an array of strings so does it make sense to create an object for it?
   We are anyways not doing it anywhere in java client and using JsonNode.
   




----------------------------------------------------------------
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:
users@infra.apache.org



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