Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B8F917688 for ; Thu, 9 Apr 2015 17:18:01 +0000 (UTC) Received: (qmail 48707 invoked by uid 500); 9 Apr 2015 17:17:48 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 48646 invoked by uid 500); 9 Apr 2015 17:17:48 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 48635 invoked by uid 500); 9 Apr 2015 17:17:48 -0000 Delivered-To: apmail-incubator-drill-dev@incubator.apache.org Received: (qmail 48630 invoked by uid 99); 9 Apr 2015 17:17:48 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2015 17:17:48 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id E5F971D3630; Thu, 9 Apr 2015 17:17:49 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3478139819294637497==" MIME-Version: 1.0 Subject: Re: Review Request 32886: DRILL-2639: Planner bug - RelOptPlanner.CannotPlanExceptio From: "Sean Hsuan-Yi Chu" To: "Aman Sinha" Cc: "Sean Hsuan-Yi Chu" , "drill" Date: Thu, 09 Apr 2015 17:17:49 -0000 Message-ID: <20150409171749.1488.85603@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Sean Hsuan-Yi Chu" X-ReviewGroup: drill-git X-ReviewRequest-URL: https://reviews.apache.org/r/32886/ X-Sender: "Sean Hsuan-Yi Chu" References: <20150409063804.1489.58901@reviews.apache.org> In-Reply-To: <20150409063804.1489.58901@reviews.apache.org> Reply-To: "Sean Hsuan-Yi Chu" X-ReviewRequest-Repository: drill-git --===============3478139819294637497== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On April 9, 2015, 6:38 a.m., Aman Sinha wrote: > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillOptiq.java, line 506 > > > > > > I don't think you need a new utility method.. you can get the major type from Types.getMajorTypeFromName() and supply it the sqlType.getName() and you can get the minor type from major type. Two reasons: 1. Types.getMajorTypeFromName() doese not cover all SqlTypeName. For example, SqlTypeName.SYMBOL would not be caught in any "case" in the switch logic. In my new method, I am sure every case is covered. 2. Using "String" type as switch logic could sometimes be risky. Especially here, when we can have the option to use 'enum', it seems easier and safer to use enum, as opposed to casting to String and switch-case. - Sean Hsuan-Yi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32886/#review79485 ----------------------------------------------------------- On April 6, 2015, 4:45 p.m., Sean Hsuan-Yi Chu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32886/ > ----------------------------------------------------------- > > (Updated April 6, 2015, 4:45 p.m.) > > > Review request for drill and Aman Sinha. > > > Bugs: DRILL-2639 > https://issues.apache.org/jira/browse/DRILL-2639 > > > Repository: drill-git > > > Description > ------- > > At planning for Union-All, block only the cases where implicit casting cannot resolve an output type > > > Diffs > ----- > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillRelOptUtil.java aba6022 > exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillUnionRelBase.java 932aa76 > exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillOptiq.java 796f0f7 > exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java fee1d6a > > Diff: https://reviews.apache.org/r/32886/diff/ > > > Testing > ------- > > QA, unit > > > Thanks, > > Sean Hsuan-Yi Chu > > --===============3478139819294637497==--