kasakrisz commented on code in PR #6023:
URL: https://github.com/apache/hive/pull/6023#discussion_r2272270319


##########
beeline/src/java/org/apache/hive/beeline/Rows.java:
##########
@@ -51,14 +55,14 @@ abstract class Rows implements Iterator {
     this.beeLine = beeLine;
     nullStr = beeLine.getOpts().getNullString();
     rsMeta = rs.getMetaData();
-    int count = rsMeta.getColumnCount();
-    primaryKeys = new Boolean[count];
     if (beeLine.getOpts().getNumberFormat().equals("default")) {
       numberFormat = null;
     } else {
       numberFormat = new DecimalFormat(beeLine.getOpts().getNumberFormat());
     }
     this.convertBinaryArrayToString = 
beeLine.getOpts().getConvertBinaryArrayToString();
+
+    primaryKeys = initializePrimaryKeyMetadata();

Review Comment:
   IIUC primary key info is queried every time a new `Rows` instance is 
created. Even if coloring is not needed. Could you please explore if this can 
be improved?



-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to