This is an automated email from the ASF dual-hosted git repository.
karan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new afb3d91777 Add unit test for complex column grouping (#13650)
afb3d91777 is described below
commit afb3d917772123ccc4ee46ac8bdb06b9ab00cdf3
Author: Adarsh Sanjeev <[email protected]>
AuthorDate: Thu Jan 12 15:25:01 2023 +0530
Add unit test for complex column grouping (#13650)
* Add unit test for complex column grouping
Co-authored-by: Karan Kumar <[email protected]>
---
.../java/org/apache/druid/msq/exec/MSQSelectTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git
a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQSelectTest.java
b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQSelectTest.java
index 5c45fbcdf6..d56afd7746 100644
---
a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQSelectTest.java
+++
b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQSelectTest.java
@@ -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()
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]