mirror of https://github.com/apache/druid.git
cleanup
This commit is contained in:
parent
e72d54b4a2
commit
1fd2addc6e
|
@ -50,7 +50,7 @@ public abstract class Unnest extends SingleRel
|
|||
@Override
|
||||
protected RelDataType deriveRowType()
|
||||
{
|
||||
List<RelDataTypeField> fields =new ArrayList<>();
|
||||
List<RelDataTypeField> fields = new ArrayList<>();
|
||||
fields.addAll(input.getRowType().getFieldList());
|
||||
fields.add(unnestFieldType);
|
||||
return new RelRecordType(fields);
|
||||
|
|
|
@ -85,12 +85,12 @@ public class UnnestInputCleanupRule extends RelOptRule implements SubstitutionRu
|
|||
|
||||
RexNode newUnnestExpr = unnestInput.accept(new ExpressionPullerRexShuttle(newProjects, inputIndex));
|
||||
|
||||
if(newUnnestExpr instanceof RexInputRef) {
|
||||
if (newUnnestExpr instanceof RexInputRef) {
|
||||
// this won't make it simpler
|
||||
return;
|
||||
}
|
||||
|
||||
if(newProjects.get(inputIndex) == null ) {
|
||||
if (newProjects.get(inputIndex) == null) {
|
||||
newProjects.set(
|
||||
inputIndex,
|
||||
rexBuilder.makeInputRef(oldProject.getInput(), 0)
|
||||
|
@ -118,9 +118,6 @@ public class UnnestInputCleanupRule extends RelOptRule implements SubstitutionRu
|
|||
// not-anymore referenced input columns beneath oldProject
|
||||
List<RexNode> projectFields = new ArrayList<>(builder.fields());
|
||||
int hideCount = newProjects.size() - oldProject.getProjects().size();
|
||||
if(hideCount>0) {
|
||||
// return;
|
||||
}
|
||||
for (int i = 0; i < hideCount; i++) {
|
||||
projectFields.remove(unnest.getRowType().getFieldCount() - 2);
|
||||
}
|
||||
|
|
|
@ -5310,7 +5310,6 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
|||
);
|
||||
}
|
||||
|
||||
// @DecoupledTestConfig(quidemReason = QuidemTestCaseReason.UNNEST_EXTRA_SCAN, separateDefaultModeTest = true)
|
||||
@Test
|
||||
public void testUnnestWithFilters()
|
||||
{
|
||||
|
@ -5460,7 +5459,6 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
|||
);
|
||||
}
|
||||
|
||||
// @DecoupledTestConfig(quidemReason = QuidemTestCaseReason.UNNEST_EXTRA_SCAN, separateDefaultModeTest = true)
|
||||
@Test
|
||||
public void testUnnestWithFiltersInsideAndOutside()
|
||||
{
|
||||
|
@ -5498,7 +5496,6 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
|||
);
|
||||
}
|
||||
|
||||
// @DecoupledTestConfig(ignoreExpectedQueriesReason = IgnoreQueriesReason.UNNEST_EXTRA_SCANQUERY)
|
||||
@Test
|
||||
public void testUnnestWithFiltersInsideAndOutside1()
|
||||
{
|
||||
|
@ -5539,7 +5536,6 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
|||
);
|
||||
}
|
||||
|
||||
// @DecoupledTestConfig(ignoreExpectedQueriesReason = IgnoreQueriesReason.UNNEST_EXTRA_SCANQUERY)
|
||||
@Test
|
||||
public void testUnnestWithFiltersOutside()
|
||||
{
|
||||
|
@ -6769,7 +6765,6 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
|||
);
|
||||
}
|
||||
|
||||
// @DecoupledTestConfig(ignoreExpectedQueriesReason = IgnoreQueriesReason.UNNEST_EXTRA_SCANQUERY)
|
||||
@Test
|
||||
public void testUnnestWithTimeFilterAndAnotherFilter()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue