make helper method

This commit is contained in:
Zoltan Haindrich 2024-11-12 14:19:29 +00:00
parent 322ec81fb0
commit e8f06bf90d
2 changed files with 14 additions and 5 deletions

View File

@ -1658,4 +1658,16 @@ public class BaseCalciteQueryTest extends CalciteTestBase
}
return file;
}
/**
* Adds shadowing in non-decoupled mode planning.
*
* Due to some circumstances - DruidUnnestRel have exposed all columns during planning;
* which made the VC registry to see some columns which are not selected ; and as a result
* it renamed some columns with underscores.
*/
public String ds(String colName)
{
return "_" + colName;
}
}

View File

@ -5612,13 +5612,13 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
)
.setInterval(querySegmentSpec(Filtration.eternity()))
.setContext(QUERY_CONTEXT_UNNEST)
.setDimensions(new DefaultDimensionSpec("j0.unnest", "_d0", ColumnType.STRING))
.setDimensions(new DefaultDimensionSpec("j0.unnest", ds("d0"), ColumnType.STRING))
.setGranularity(Granularities.ALL)
.setLimitSpec(
DefaultLimitSpec
.builder()
.orderBy(new OrderByColumnSpec(
"_d0",
ds("d0"),
OrderByColumnSpec.Direction.DESCENDING,
StringComparators.LEXICOGRAPHIC
))
@ -6340,9 +6340,6 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
@Test
public void testUnnestWithGroupByHavingSelector()
{
// if(true) {
// throw new RuntimeException("tjhs");
// }
cannotVectorize();
testQuery(
"SELECT d3, COUNT(*) FROM druid.numfoo, UNNEST(MV_TO_ARRAY(dim3)) AS unnested(d3) GROUP BY d3 HAVING d3='b'",