mqliang commented on a change in pull request #6583:
URL: https://github.com/apache/incubator-pinot/pull/6583#discussion_r582223923
##########
File path:
pinot-integration-tests/src/test/java/org/apache/pinot/compat/tests/QueryOp.java
##########
@@ -55,7 +72,97 @@ public void setExpectedResultsFileName(String
expectedResultsFileName) {
@Override
boolean runOp() {
- System.out.println("Verifying queries in " + _queryFileName + " against
results in " + _expectedResultsFileName);
- return true;
+ System.out.printf("Verifying queries in %s against results in %s\n",
_queryFileName, _expectedResultsFileName);
+ try {
+ return verifyQueries();
+ } catch (Exception e) {
+ LOGGER.error("FAILED to verify queries in {}: {}", _queryFileName, e);
+ return false;
+ }
+ }
+
+ boolean verifyQueries()
+ throws Exception {
+ BufferedReader expectedResultReader = null;
+ boolean testPassed = false;
+
+ try (BufferedReader queryReader = new BufferedReader(
+ new InputStreamReader(new FileInputStream(_queryFileName),
StandardCharsets.UTF_8))) {
+ if (_queryFileName == null) {
Review comment:
Use a try-with-resources statement now.
##########
File path:
pinot-integration-tests/src/test/java/org/apache/pinot/compat/tests/QueryOp.java
##########
@@ -30,13 +38,22 @@
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class QueryOp extends BaseOp {
+ private static final Logger LOGGER = LoggerFactory.getLogger(QueryOp.class);
+
+ private static final String NUM_DOCS_SCANNED = "numDocsScanned";
Review comment:
done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]