okumin commented on code in PR #5909:
URL: https://github.com/apache/hive/pull/5909#discussion_r2174306467


##########
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java:
##########
@@ -500,6 +500,9 @@ public CommandProcessorResponse 
processReader(BufferedReader r) throws IOExcepti
     StringBuilder qsb = new StringBuilder();
 
     while ((line = r.readLine()) != null) {
+      // Skipping the proto tables location.
+      if (line.startsWith("LOCATION '_REPLACE_WITH_")) continue;

Review Comment:
   To state my intention clearly, I'm saying we can replace this line
   
   ```
   String stsdbPath =
             HiveTestEnvSetup.HIVE_ROOT + 
"/standalone-metastore/metastore-server/src/main/sql/hive/hive-schema-" + 
schemaVersion + ".hive.sql";
   qt.getCliDriver().processLine("source " + stsdbPath)
   ```
   
   with like this. Pseudo code.
   
   ```
   String templatePath =
             HiveTestEnvSetup.HIVE_ROOT + 
"/standalone-metastore/metastore-server/src/main/sql/hive/hive-schema-" + 
schemaVersion + ".hive.sql";
   String newQueries = 
read(templatePath).replace("_REPLACE_WITH_APP_DATA_LOCATION_", 
".../itests/qtest/target/localfs/warehouse/sys.db/app_data").replace("_REPLACE_WITH_(omitted)",
 "(omitted)").replace("(omitted)", "(omitted)").replace("(omitted)", 
"(omitted)");
   String sourcePath = write(templatePath, "somewhere");
   qt.getCliDriver().processLine("source " + sourcePath)
   ```
   
   Then, we don't need to hack a parser or drivers.



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