From 247931bc22c5716c2964fedf384c81bfae975a91 Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Fri, 20 Oct 2023 08:35:57 +0000 Subject: [PATCH] return null instead of default --- .../semantic/DefaultColumnSelectorFactoryMaker.java | 2 +- .../rowsandcols/semantic/CombinedSemanticInterfacesTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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")); } /**