kgyrtkirk commented on a change in pull request #1742:
URL: https://github.com/apache/hive/pull/1742#discussion_r677540831
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java
##########
@@ -394,16 +393,13 @@ WarehouseInstance verifyResults(String[] data) throws
IOException {
}
WarehouseInstance verifyFailure(String[] data) throws IOException {
- List<String> results = getOutput();
- logger.info("Expecting {}", StringUtils.join(data, ","));
- logger.info("Got {}", results);
- boolean dataMatched = (data.length == results.size());
- if (dataMatched) {
- for (int i = 0; i < data.length; i++) {
- dataMatched &=
data[i].toLowerCase().equals(results.get(i).toLowerCase());
- }
- }
- assertFalse(dataMatched);
+ final List<String> expectedResults =
+ Arrays.asList(data).stream().map(r ->
r.toLowerCase()).collect(Collectors.toList());
+ final List<String> actualResults = getOutput().stream().map(r ->
r.toLowerCase()).collect(Collectors.toList());
+
+ assertTrue("Data " + expectedResults + " should not be present in " +
actualResults,
+ Collections.disjoint(expectedResults, actualResults));
+
Review comment:
old and new code seem to be doing different things
old is:
```
e[0] != r[0] || ... || e[n] != r[n]
```
new block is a condition which is checking a set operation between the
elements...
why is this change necessary - how this is connected to a hadoop upgrade?
##########
File path: ql/src/test/results/clientpositive/llap/check_constraint.q.out
##########
@@ -2415,14 +2415,14 @@ STAGE PLANS:
outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
Statistics: Num rows: 1 Data size: 409 Basic stats: COMPLETE
Column stats: NONE
Select Operator
- expressions: _col1 (type: string), _col0 (type: int), _col4
(type: string), _col5 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>),
_col2 (type: string), _col3 (type: int)
+ expressions: _col0 (type: int), _col4 (type: string), _col3
(type: int), _col1 (type: string), _col5 (type:
struct<writeid:bigint,bucketid:int,rowid:bigint>), _col2 (type: string)
Review comment:
the join operand order seem to have changed
--
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]