This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 30cdb883685 HIVE-29118: Remove extra metadata calls if coloring is not
needed (#6003)
30cdb883685 is described below
commit 30cdb88368559b7a36266ff3629f1c361b52aad5
Author: InvisibleProgrammer <[email protected]>
AuthorDate: Fri Aug 1 08:09:28 2025 +0200
HIVE-29118: Remove extra metadata calls if coloring is not needed (#6003)
---
beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java
b/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java
index f8b8b9cb2fd..12985c844ee 100644
--- a/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java
+++ b/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java
@@ -122,14 +122,14 @@ ColorBuffer getOutputString(Rows rows, Rows.Row row,
String delim) {
if (row.isMeta) {
v = beeLine.getColorBuffer().center(row.values[i], row.sizes[i]);
- if (rows.isPrimaryKey(i)) {
+ if (beeLine.getOpts().getColor() && rows.isPrimaryKey(i)) {
buf.cyan(v.getMono());
} else {
buf.bold(v.getMono());
}
} else {
v = beeLine.getColorBuffer().pad(row.values[i], row.sizes[i]);
- if (rows.isPrimaryKey(i)) {
+ if (beeLine.getOpts().getColor() && rows.isPrimaryKey(i)) {
buf.cyan(v.getMono());
} else {
buf.append(v.getMono());