Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8775D17298 for ; Wed, 18 Feb 2015 22:43:12 +0000 (UTC) Received: (qmail 18890 invoked by uid 500); 18 Feb 2015 22:43:12 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 18690 invoked by uid 500); 18 Feb 2015 22:43:12 -0000 Mailing-List: contact issues-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 issues@drill.apache.org Received: (qmail 18550 invoked by uid 99); 18 Feb 2015 22:43:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2015 22:43:12 +0000 Date: Wed, 18 Feb 2015 22:43:12 +0000 (UTC) From: "Jinfeng Ni (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-2269) Provide default implementation for getting cost of evaluating an expression in base class of LogicalExpression, in stead of throw Exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jinfeng Ni created DRILL-2269: --------------------------------- Summary: Provide default implementation for getting cost of evaluating an expression in base class of LogicalExpression, in stead of throw Exception Key: DRILL-2269 URL: https://issues.apache.org/jira/browse/DRILL-2269 Project: Apache Drill Issue Type: Bug Reporter: Jinfeng Ni Today, the abstract class of LogicalExpression will throw Exception for two methods related to estimate the cost of evaluating an expression, in the hope that sub classes will override those two methods. However, if someone forgets to override, compiler and mvn build process will still be successful, yet will hit Exception in execution-time, complaining the sub class does not implement these methods. As Drill's adding more sub classes of LogicalExpression to the code base, it's more likely for someone to forget to override those two methods, making it error-prone to just throw Exception in the base class. In stead, we should provide a default implementation for those two methods in the base class. Certain sub classes will override to change the behavior. -- This message was sent by Atlassian JIRA (v6.3.4#6332)