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

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

ilooner commented on a change in pull request #1319: DRILL-6212: Prevent 
recursive cast expressions
URL: https://github.com/apache/drill/pull/1319#discussion_r195298995
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/TestProjectWithFunctions.java
 ##########
 @@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill;
+
+// Test the optimizer plan in terms of projecting different functions e.g. cast
+
+import org.apache.drill.categories.PlannerTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(PlannerTest.class)
+public class TestProjectWithFunctions extends PlanTestBase {
 
 Review comment:
   Since this isn't using any of the planning test functions please extend 
ClusterTest instead and use the ClientFixture to run the queries. We are trying 
to move all the integration tests to using ClusterFixture and ClientFixture 
instead of the now deprecated BaseTestQuery and its child classes.

----------------------------------------------------------------
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


> A simple join is recursing too deep in planning and eventually throwing stack 
> overflow.
> ---------------------------------------------------------------------------------------
>
>                 Key: DRILL-6212
>                 URL: https://issues.apache.org/jira/browse/DRILL-6212
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.12.0
>            Reporter: Hanumath Rao Maduri
>            Assignee: Gautam Kumar Parai
>            Priority: Critical
>             Fix For: 1.14.0
>
>
> Create two views using following statements.
> {code}
> create view v1 as select cast(greeting as int) f from 
> dfs.`/home/mapr/data/json/temp.json`;
> create view v2 as select cast(greeting as int) f from 
> dfs.`/home/mapr/data/json/temp.json`;
> {code}
> Executing the following join query produces a stack overflow during the 
> planning phase.
> {code}
> select t1.f from dfs.tmp.v1 as t inner join dfs.tmp.v2 as t1 on cast(t.f as 
> int) = cast(t1.f as int) and cast(t.f as int) = 10 and cast(t1.f as int) = 10;
> {code}



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

Reply via email to