dengzhhu653 commented on code in PR #6947:
URL: https://github.com/apache/hive/pull/6947#discussion_r4479200989


##########
beeline/src/java/org/apache/hive/beeline/BeeLine.java:
##########
@@ -1543,7 +1545,9 @@ private InputStream prepareInputStream(InputStream 
inputStream) {
   protected Terminal buildTerminal(InputStream inputStream) throws IOException 
{
     Terminal terminal;
     if (inputStream != null) { // typically when there is a file script to 
read from
-      terminal = TerminalBuilder.builder().streams(inputStream, 
getErrorStream()).build();
+      // An ExternalTerminal is a plain stream pump and reads the script 
faithfully.
+      terminal = new ExternalTerminal("beeline", Terminal.TYPE_DUMB, 
inputStream, getErrorStream(),

Review Comment:
   For beeline today, getCommands(File) already uses "UTF-8", other beeline I/O 
also standardizes on UTF-8 (password file contents, OutputFile with "UTF-8"). 
Explicit UTF-8 aligns `-f` with existing file handling.
   We can support something like `getOpts().getScriptCharset()` in the future.



-- 
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