Return-Path: X-Original-To: apmail-calcite-dev-archive@www.apache.org Delivered-To: apmail-calcite-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 4369918634 for ; Fri, 24 Jul 2015 20:58:16 +0000 (UTC) Received: (qmail 92025 invoked by uid 500); 24 Jul 2015 20:58:16 -0000 Delivered-To: apmail-calcite-dev-archive@calcite.apache.org Received: (qmail 91964 invoked by uid 500); 24 Jul 2015 20:58:16 -0000 Mailing-List: contact dev-help@calcite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@calcite.incubator.apache.org Delivered-To: mailing list dev@calcite.incubator.apache.org Received: (qmail 91952 invoked by uid 99); 24 Jul 2015 20:58:15 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2015 20:58:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 589FDD7689 for ; Fri, 24 Jul 2015 20:58:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YW5pv5bT4xue for ; Fri, 24 Jul 2015 20:58:14 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 781D443DDA for ; Fri, 24 Jul 2015 20:58:14 +0000 (UTC) Received: by wibud3 with SMTP id ud3so42495604wib.0 for ; Fri, 24 Jul 2015 13:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=sJFqPz+mo5MwS0WIJihU7L/hGqauSCrzCTHdyO3+PMA=; b=obA1SBDlGPTrJOOPr2Bzmm+pfpMMZwkRIJGx3GE+9Cr/7jT4KSbxOIqLYKHmg5j5N5 BTzpen9mOkw3WuEhZhbPdLVF/lFmb1npSEcTbGLujTiVSHJRB5d+62WjXrpJUE+uEl1I OrxzbDQSq5fws5R64e/olPX959eLiYiLvxh48dnJ12U8Lw1qOLxLv1RJy42yX+35ifxD Btk1mzmq6aetEN3fJULMz+w+9NeHjEvxnRpff7WZHJ0aV4NgSiK3qMEUGLox8awc59Ou CSxmRrLeMWe8lMtW9YQJFclK9Ls6i2xwYaYOoqWUCK2D8uchZg06uF7OT+g0OsY5GX6S B8gA== MIME-Version: 1.0 X-Received: by 10.180.218.195 with SMTP id pi3mr431878wic.71.1437771403518; Fri, 24 Jul 2015 13:56:43 -0700 (PDT) Received: by 10.27.176.157 with HTTP; Fri, 24 Jul 2015 13:56:43 -0700 (PDT) In-Reply-To: References: <19C65F50-0CAA-4D95-9087-AA43B8BF9BC0@apache.org> <0DFFBBF0-607C-44A1-9F7B-3B7596DDB86F@gmail.com> Date: Fri, 24 Jul 2015 23:56:43 +0300 Message-ID: Subject: Re: Unclear hard-coding in planner and other parts of source code From: Vladimir Sitnikov To: "dev@calcite.incubator.apache.org" Content-Type: text/plain; charset=UTF-8 Costing model indeed begs improvements. However, to improve it some real-life cases are required. It happens so that even current formulas work (Julian-only-knows-how) for current unittest/etc cases. This is not completely new topic, no-one just came up with test cases and fixes. >To set cost I overrode computeSelfCost method where cpu cost and io cost was multiplied by length of row. But it didn't help. Your next battle would probably be "costing of computation pushdown". In other words, costing of computations in java vs costing of the same operations performed in your storage. I've noticed that Calcite prefers "to just full scan the data sources" and join/aggregate in java, however your mileage may vary. Vladimir