add apidoc

This commit is contained in:
Zoltan Haindrich 2024-12-19 07:18:28 +00:00
parent cc7e0b4ac0
commit 7e5658e6b7
2 changed files with 17 additions and 1 deletions

View File

@ -50,6 +50,11 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
/**
* DruidRelFieldTrimmer is a subclass of RelFieldTrimmer that provides additional support for Druid specific RelNodes.
*
* It is used to trim fields from Druid specific RelNodes like LogicalUnnest.
*/
public class DruidRelFieldTrimmer extends RelFieldTrimmer
{
private final RelBuilder relBuilder;

View File

@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.logical.LogicalCorrelate;
import org.apache.calcite.runtime.CalciteContextException;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.error.DruidException;
@ -41,7 +42,6 @@ import org.apache.druid.math.expr.ExprEval;
import org.apache.druid.math.expr.ExprMacroTable;
import org.apache.druid.query.Druids;
import org.apache.druid.query.InlineDataSource;
import org.apache.druid.query.JoinAlgorithm;
import org.apache.druid.query.JoinDataSource;
import org.apache.druid.query.LookupDataSource;
import org.apache.druid.query.OperatorFactoryBuilders;
@ -15894,6 +15894,17 @@ public class CalciteQueryTest extends BaseCalciteQueryTest
assertThat(e, invalidSqlContains("DISTINCT is not supported for window functions"));
}
@Test
public void testRelFieldTrimmerUpgrade()
{
assertEquals(
"1.37.0",
RelNode.class.getPackage().getImplementationVersion(),
"Calcite version changed; check if DruidRelFieldTrimmer#trimFields(LogicalCorrelate correlate,...) is still needed or not!"
);
}
@Test
public void testUnSupportedAggInSelectWindow()
{