github-code-scanning[bot] commented on code in PR #14955:
URL: https://github.com/apache/druid/pull/14955#discussion_r1320426982
##########
processing/src/test/java/org/apache/druid/segment/nested/NestedDataColumnSupplierV4Test.java:
##########
@@ -319,36 +475,111 @@
.computeBitmapResult(resultFactory)
.get(rowNumber));
Assert.assertFalse(nullValueIndex.get().computeBitmapResult(resultFactory).get(rowNumber));
-
Assert.assertTrue(dimSelector.makeValueMatcher(theString).matches());
Assert.assertFalse(dimSelector.makeValueMatcher(NO_MATCH).matches());
Assert.assertTrue(dimSelector.makeValueMatcher(x -> Objects.equals(x,
theString)).matches());
Assert.assertFalse(dimSelector.makeValueMatcher(x -> Objects.equals(x,
NO_MATCH)).matches());
} else {
Assert.assertNull(valueSelector.getObject());
Assert.assertTrue(path, valueSelector.isNull());
-
Assert.assertEquals(0, dimSelector.getRow().get(0));
Assert.assertNull(dimSelector.getObject());
Assert.assertNull(dimSelector.lookupName(dimSelector.getRow().get(0)));
-
Assert.assertTrue(valueSetIndex.forValue(null).computeBitmapResult(resultFactory).get(rowNumber));
Assert.assertTrue(nullValueIndex.get().computeBitmapResult(resultFactory).get(rowNumber));
Assert.assertTrue(predicateIndex.forPredicate(new
SelectorPredicateFactory(null))
.computeBitmapResult(resultFactory)
.get(rowNumber));
Assert.assertFalse(valueSetIndex.forValue(NO_MATCH).computeBitmapResult(resultFactory).get(rowNumber));
-
-
Assert.assertFalse(valueSetIndex.forValue(NO_MATCH).computeBitmapResult(resultFactory).get(rowNumber));
Assert.assertFalse(predicateIndex.forPredicate(new
SelectorPredicateFactory(NO_MATCH))
.computeBitmapResult(resultFactory)
.get(rowNumber));
-
Assert.assertTrue(dimSelector.makeValueMatcher((String) null).matches());
Assert.assertFalse(dimSelector.makeValueMatcher(NO_MATCH).matches());
Assert.assertTrue(dimSelector.makeValueMatcher(x -> x ==
null).matches());
Assert.assertFalse(dimSelector.makeValueMatcher(x -> Objects.equals(x,
NO_MATCH)).matches());
}
}
+
+ private static class SettableSelector extends
ObjectColumnSelector<StructuredData>
+ {
+ private StructuredData data;
+
+ public void setObject(StructuredData o)
+ {
+ this.data = o;
+ }
+
+ @Nullable
+ @Override
+ public StructuredData getObject()
+ {
+ return data;
+ }
+
+ @Override
+ public Class classOfObject()
+ {
+ return StructuredData.class;
+ }
+
+ @Override
+ public void inspectRuntimeShape(RuntimeShapeInspector inspector)
+ {
+
+ }
+ }
+
+ private static class OnlyPositionalReadsTypeStrategy<T> implements
TypeStrategy<T>
Review Comment:
## Unused classes and interfaces
Unused class: OnlyPositionalReadsTypeStrategy is not referenced within this
codebase. If not used as an external API it should be removed.
[Show more
details](https://github.com/apache/druid/security/code-scanning/4827)
--
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]