diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultColumnSelectorFactoryMaker.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultColumnSelectorFactoryMaker.java index 0a1b33337048..4611280ce89e 100644 --- a/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultColumnSelectorFactoryMaker.java +++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultColumnSelectorFactoryMaker.java @@ -162,7 +162,7 @@ public ColumnCapabilities getColumnCapabilities(String column) { return withColumnAccessor(column, columnAccessor -> { if (columnAccessor == null) { - return ColumnCapabilitiesImpl.createDefault(); + return null; } else { return new ColumnCapabilitiesImpl() .setType(columnAccessor.getType()) diff --git a/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/CombinedSemanticInterfacesTest.java b/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/CombinedSemanticInterfacesTest.java index d69fe0fcad90..b7c91b854e4d 100644 --- a/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/CombinedSemanticInterfacesTest.java +++ b/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/CombinedSemanticInterfacesTest.java @@ -44,7 +44,7 @@ import java.util.function.Function; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; /** * Place where tests can live that are testing the interactions of multiple semantic interfaces @@ -81,7 +81,7 @@ public void testColumnSelectorFactoryGetColumnCapabilitiesNonExistentColumn() AtomicInteger currRow = new AtomicInteger(); ColumnSelectorFactory csfm = ColumnSelectorFactoryMaker.fromRAC(rac).make(currRow); - assertNotNull(csfm.getColumnCapabilities("nonexistent")); + assertNull(csfm.getColumnCapabilities("nonexistent")); } /**