[ 
https://issues.apache.org/jira/browse/DRILL-5188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16515564#comment-16515564
 ] 

ASF GitHub Bot commented on DRILL-5188:
---------------------------------------

vvysotskyi commented on a change in pull request #1321:  DRILL-5188: Expand 
sub-queries using rules
URL: https://github.com/apache/drill/pull/1321#discussion_r196006724
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/TestDisabledFunctionality.java
 ##########
 @@ -47,28 +47,21 @@ private static void 
throwAsUnsupportedException(UserException ex) throws Excepti
     throw ex;
   }
 
-  @Test(expected = UnsupportedFunctionException.class)  // see DRILL-1937
-  public void testDisabledExplainplanForComparisonWithNonscalarSubquery() 
throws Exception {
-    try {
-      test("explain plan for select n_name from cp.`tpch/nation.parquet` " +
-           "where n_nationkey = " +
-           "(select r_regionkey from cp.`tpch/region.parquet` " +
-           "where r_regionkey = 1)");
-    } catch(UserException ex) {
-      throwAsUnsupportedException(ex);
-    }
-  }
-
-  @Test(expected = UnsupportedFunctionException.class)  // see DRILL-1937
-  public void testDisabledComparisonWithNonscalarSubquery() throws Exception {
-    try {
-      test("select n_name from cp.`tpch/nation.parquet` " +
-           "where n_nationkey = " +
-           "(select r_regionkey from cp.`tpch/region.parquet` " +
-           "where r_regionkey = 1)");
-    } catch(UserException ex) {
-      throwAsUnsupportedException(ex);
-    }
+  @Test
+  public void testComparisonWithSingleValueSubQuery() throws Exception {
 
 Review comment:
   Thanks, moved these test cases into another class.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> TPC-DS query16 fails - IllegalArgumentException: Target must be less than 
> target count
> --------------------------------------------------------------------------------------
>
>                 Key: DRILL-5188
>                 URL: https://issues.apache.org/jira/browse/DRILL-5188
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.10.0
>         Environment: 4 node cluster
>            Reporter: Khurram Faraaz
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>             Fix For: 1.14.0
>
>
> TPC-DS query 16 fails with below Exception. Query 32, Query 92, query 95 also 
> fail due to same Exception, on Drill 1.10.0 (commit ID: bbcf4b76) against SF1 
> data.
> Details from drillbit.log and stack trace.
> {noformat}
> 2017-01-10 11:42:54,769 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.drill.exec.work.foreman.Foreman - Query text for query id 
> 278b3740-fa7b-0f27-5c42-92f2f63f7f3d: SELECT
> Count(DISTINCT cs_order_number) AS `order count` ,
> Sum(cs_ext_ship_cost)           AS `total shipping cost` ,
> Sum(cs_net_profit)              AS `total net profit`
> FROM     catalog_sales cs1 ,
> date_dim ,
> customer_address ,
> call_center
> WHERE    d_date BETWEEN '2002-3-01' AND      (
> Cast('2002-3-01' AS DATE) + INTERVAL '60' day)
> AND      cs1.cs_ship_date_sk = d_date_sk
> AND      cs1.cs_ship_addr_sk = ca_address_sk
> AND      ca_state = 'IA'
> AND      cs1.cs_call_center_sk = cc_call_center_sk
> AND      cc_county IN ('Williamson County',
> 'Williamson County',
> 'Williamson County',
> 'Williamson County',
> 'Williamson County' )
> AND      EXISTS
> (
> SELECT *
> FROM   catalog_sales cs2
> WHERE  cs1.cs_order_number = cs2.cs_order_number
> AND    cs1.cs_warehouse_sk <> cs2.cs_warehouse_sk)
> AND      NOT EXISTS
> (
> SELECT *
> FROM   catalog_returns cr1
> WHERE  cs1.cs_order_number = cr1.cr_order_number)
> ORDER BY count(DISTINCT cs_order_number)
> LIMIT 100
> 2017-01-10 11:42:54,887 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,888 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,895 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,895 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,902 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,903 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,908 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,909 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,919 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,920 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] INFO  
> o.a.d.exec.store.dfs.FileSelection - FileSelection.getStatuses() took 0 ms, 
> numFiles: 1
> 2017-01-10 11:42:54,946 [278b3740-fa7b-0f27-5c42-92f2f63f7f3d:foreman] ERROR 
> o.a.drill.exec.work.foreman.Foreman - SYSTEM ERROR: IllegalArgumentException: 
> Target must be less than target count, 3
> [Error Id: 61befda9-3479-48a4-a6ff-181703aea1b7 on centos-01.qa.lab:31010]
> org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
> IllegalArgumentException: Target must be less than target count, 3
> [Error Id: 61befda9-3479-48a4-a6ff-181703aea1b7 on centos-01.qa.lab:31010]
>         at 
> org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:544)
>  ~[drill-common-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:824)
>  [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:944) 
> [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:281) 
> [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [na:1.8.0_91]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [na:1.8.0_91]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
> Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected 
> exception during fragment initialization: Target must be less than target 
> count, 3
>         ... 4 common frames omitted
> Caused by: java.lang.IllegalArgumentException: Target must be less than 
> target count, 3
>         at 
> org.apache.calcite.util.mapping.Mappings$PartialFunctionImpl.set(Mappings.java:1642)
>  ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at org.apache.calcite.util.mapping.Mappings.target(Mappings.java:343) 
> ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.calcite.sql2rel.RelDecorrelator.decorrelateRel(RelDecorrelator.java:411)
>  ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source) 
> ~[na:na]
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:1.8.0_91]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
>         at 
> org.apache.calcite.util.ReflectUtil.invokeVisitorInternal(ReflectUtil.java:257)
>  ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.calcite.util.ReflectUtil.invokeVisitor(ReflectUtil.java:214) 
> ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.calcite.util.ReflectUtil$1.invokeVisitor(ReflectUtil.java:471) 
> ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.calcite.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1433)
>  ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.calcite.sql2rel.RelDecorrelator.decorrelate(RelDecorrelator.java:238)
>  ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.calcite.sql2rel.RelDecorrelator.decorrelateQuery(RelDecorrelator.java:205)
>  ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
>         at 
> org.apache.drill.exec.planner.sql.SqlConverter.toRel(SqlConverter.java:265) 
> ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel(DefaultSqlHandler.java:626)
>  ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert(DefaultSqlHandler.java:195)
>  ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:164)
>  ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPhysicalPlan(DrillSqlWorker.java:122)
>  ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:96)
>  ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at 
> org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:1017) 
> [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:264) 
> [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
>         ... 3 common frames omitted
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to