snleee commented on a change in pull request #4737: Druid-Pinot Segment
Converter Tool
URL: https://github.com/apache/incubator-pinot/pull/4737#discussion_r346669068
##########
File path:
contrib/pinot-druid-migration/src/main/java/org/apache/pinot/druid/data/readers/DruidSegmentRecordReader.java
##########
@@ -171,8 +171,8 @@ public GenericRow next(GenericRow reuse) {
Object value = selector.getObject();
if (value != null && !fieldSpec.isSingleValueField()) {
// Multi-valued dimensions in Druid are stored as Arrays.ArrayList
(this has been checked)
- Preconditions.checkArgument(value.getClass() ==
java.util.Arrays.asList().getClass(), "The multi-valued dimension " +
columnName +
- " should be java.util.Arrays$ArrayList, but it is " +
value.getClass());
+ Preconditions.checkArgument(value.getClass() ==
java.util.Arrays.asList().getClass(),
Review comment:
As I mentioned in the previous comment, you need to use `equals()` for
object comparison.
Moreover, you can try to use `instanceof` instead of checking class object
by calling `getClass()`.
e.g.
```
Preconditions.checkState(value instanceof List, errorMessage);
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]