kasakrisz commented on a change in pull request #2735:
URL: https://github.com/apache/hive/pull/2735#discussion_r734238060
##########
File path:
itests/util/src/main/java/org/apache/hadoop/hive/cli/control/AbstractCoreBlobstoreCliDriver.java
##########
@@ -115,11 +114,11 @@ protected void runTestHelper(String tname, String fname,
String fpath, boolean e
try {
System.err.println("Begin query: " + fname);
- qt.addFile(fpath);
- qt.cliInit(new File(fpath));
+ qt.setInputFile(fpath);
+ qt.cliInit();
Review comment:
Maybe it is out of the scope but have you considered merging the methods
`setInputFile` and `cliInit` into one method. Or move both of them into the
constructor?
##########
File path:
itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java
##########
@@ -370,15 +372,16 @@ public void addPatternWithMaskComment(String patternStr,
String maskComment) {
patternsWithMaskComments.add(toPatternPair(patternStr, maskComment));
}
- public void initMasks(File qf, String query) {
+ public void initMasks(String query) {
+ queryMasks.clear();
if (matches(PATTERN_MASK_STATS, query)) {
- qMaskStatsQuerySet.add(qf.getName());
+ queryMasks.add(Mask.STATS);
Review comment:
nit: patterns could be declared as a field of the `Mask` enum, and the
`initMask` body could have a for loop iterating through checking the possible
patterns and adding it to `queryMasks` instead of using these `if` statements.
Like:
```
for (Mask mask : Mask.values()) {
if (matches(maks.getPattern(), query)) {
queryMasks.add(mask);
}
}
```
Same for the `Operation` enum.
--
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]