Copilot commented on code in PR #6547:
URL: https://github.com/apache/hive/pull/6547#discussion_r3463954351


##########
ql/src/test/results/clientnegative/cachingprintstream.q.out:
##########
@@ -17,9 +17,9 @@ Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
Hive Runtime Error
 #### A masked pattern was here ####
 Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: 
Unable to initialize custom script.
 #### A masked pattern was here ####
-Caused by: java.io.IOException: Cannot run program 
"FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+Caused by: java.io.IOException: Cannot run program 
"FAKE_SCRIPT_SHOULD_NOT_EXIST": Exec failed, error: 2 (No such file or 
directory) 
 #### A masked pattern was here ####
-Caused by: java.io.IOException: error=2, No such file or directory
+Caused by: java.io.IOException: Exec failed, error: 2 (No such file or 
directory) 

Review Comment:
   These newly-updated expected output lines include trailing whitespace at 
end-of-line (after the closing ")"). Trailing spaces in .q.out files are easy 
to introduce accidentally and can cause hard-to-spot mismatches; please remove 
the extra spaces here (and on the other similar lines in this file).



##########
itests/util/src/test/java/org/apache/hadoop/hive/ql/TestQOutProcessor.java:
##########
@@ -77,4 +218,23 @@ public void testSelectiveHdfsPatternMaskOnlyHdfsPath() {
   private String processLine(String line) {
     return qOutProcessor.processLine(line).get();
   }
+
+  private File tmpFile(String... lines) throws Exception {
+    File f = tmpFolder.newFile();
+    try (PrintWriter pw = new PrintWriter(f, "UTF-8")) {

Review Comment:
   The temporary test file is written using a hard-coded charset name ("UTF-8") 
even though the test already imports StandardCharsets. Using 
Files.newBufferedWriter(StandardCharsets.UTF_8) avoids 
UnsupportedEncodingException paths and keeps charset usage consistent within 
the test.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to