mirror of https://github.com/apache/druid.git
Add unit test for complex column grouping (#13650)
* Add unit test for complex column grouping Co-authored-by: Karan Kumar <karankumar1100@gmail.com>
This commit is contained in:
parent
7f54ebbf47
commit
afb3d91777
|
@ -62,6 +62,7 @@ import org.apache.druid.sql.SqlPlanningException;
|
|||
import org.apache.druid.sql.calcite.expression.DruidExpression;
|
||||
import org.apache.druid.sql.calcite.external.ExternalDataSource;
|
||||
import org.apache.druid.sql.calcite.filtration.Filtration;
|
||||
import org.apache.druid.sql.calcite.planner.UnsupportedSQLQueryException;
|
||||
import org.apache.druid.sql.calcite.util.CalciteTests;
|
||||
import org.hamcrest.CoreMatchers;
|
||||
import org.junit.Test;
|
||||
|
@ -1206,6 +1207,20 @@ public class MSQSelectTest extends MSQTestBase
|
|||
.verifyExecutionError();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGroupByWithComplexColumnThrowsUnsupportedException()
|
||||
{
|
||||
testSelectQuery()
|
||||
.setSql("select unique_dim1 from foo2 group by unique_dim1")
|
||||
.setQueryContext(context)
|
||||
.setExpectedExecutionErrorMatcher(CoreMatchers.allOf(
|
||||
CoreMatchers.instanceOf(UnsupportedSQLQueryException.class),
|
||||
ThrowableMessageMatcher.hasMessage(CoreMatchers.containsString(
|
||||
"SQL requires a group-by on a column of type COMPLEX<hyperUnique> that is unsupported"))
|
||||
))
|
||||
.verifyExecutionError();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGroupByMultiValueMeasureQuery()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue