You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/07/04 05:22:18 UTC

[GitHub] [orc] yuokada commented on a change in pull request #660: ORC-728: Support head command in Java Tools

yuokada commented on a change in pull request #660:
URL: https://github.com/apache/orc/pull/660#discussion_r663448397



##########
File path: java/tools/src/java/org/apache/orc/tools/PrintData.java
##########
@@ -195,42 +200,82 @@ static void printRow(JSONWriter writer,
   }
 
   static void printJsonData(PrintStream printStream,
-                            Reader reader) throws IOException, JSONException {
-    OutputStreamWriter out = new OutputStreamWriter(printStream, "UTF-8");
+          Reader reader, Optional<Integer> numberOfRows) throws IOException, JSONException {
+    OutputStreamWriter out = new OutputStreamWriter(printStream, StandardCharsets.UTF_8);
     RecordReader rows = reader.rows();
     try {
       TypeDescription schema = reader.getSchema();
       VectorizedRowBatch batch = schema.createRowBatch();
+      Integer counter = 0;
       while (rows.nextBatch(batch)) {
-        for(int r=0; r < batch.size; ++r) {
+        for (int r=0; r < batch.size; ++r) {
           JSONWriter writer = new JSONWriter(out);
           printRow(writer, batch, schema, r);

Review comment:
       @dongjoon-hyun Sorry for late response. I sent a new pull request for this issue.
   https://github.com/apache/orc/pull/737




-- 
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: dev-unsubscribe@orc.apache.org

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