Skip to content

Commit

Permalink
Revert "x"
Browse files Browse the repository at this point in the history
This reverts commit d5dc13b.
  • Loading branch information
kgyrtkirk committed Jul 24, 2024
1 parent d5dc13b commit 2e1e549
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import org.apache.druid.catalog.model.facade.DatasourceFacade;
import org.apache.druid.catalog.model.table.ClusterKeySpec;
import org.apache.druid.common.utils.IdUtils;
import org.apache.druid.error.DruidException;
import org.apache.druid.error.InvalidSqlInput;
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.common.granularity.Granularity;
Expand Down Expand Up @@ -920,14 +919,4 @@ private static boolean containsCall(SqlNode node,
}
}

@Override
protected void validateWindowClause(SqlSelect select)
{
SqlNodeList windows = select.getWindowList();
for (SqlNode sqlNode : windows) {
if(SqlUtil.containsAgg(sqlNode)) {
throw DruidException.defensive("ds");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,21 +231,16 @@ public void windowQueryTestWithCustomContextMaxSubqueryBytes(String filename) th
}
}



@Test
public void testWithArrayConcat()
{
testBuilder()
.sql("select \n"
+ " countryName, \n"
+ " cityName, \n"
+ " channel, \n"
+ " row_number() over w as c\n"
+ "from wikipedia \n"
+ "where countryName in ('Austria', 'Republic of Korea')\n"
+ "group by countryName, cityName, channel\n"
+ "window w as (partition by max(length(cityName)) order by countryName, cityName, channel, max(length(cityName)))")
.sql("select countryName, cityName, channel, "
+ "array_concat_agg(ARRAY['abc', channel], 10000) over (partition by cityName order by countryName) as c\n"
+ "from wikipedia\n"
+ "where countryName in ('Austria', 'Republic of Korea') "
+ "and (cityName in ('Vienna', 'Seoul') or cityName is null)\n"
+ "group by countryName, cityName, channel")
.queryContext(ImmutableMap.of(
PlannerContext.CTX_ENABLE_WINDOW_FNS, true,
QueryContexts.ENABLE_DEBUG, true
Expand Down

0 comments on commit 2e1e549

Please sign in to comment.