Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-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 C4F5A179BD for ; Thu, 23 Oct 2014 17:04:34 +0000 (UTC) Received: (qmail 14972 invoked by uid 500); 23 Oct 2014 17:04:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 14888 invoked by uid 500); 23 Oct 2014 17:04:34 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 14875 invoked by uid 500); 23 Oct 2014 17:04:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 14872 invoked by uid 99); 23 Oct 2014 17:04:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Oct 2014 17:04:34 +0000 Date: Thu, 23 Oct 2014 17:04:34 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-8433) CBO loses a column during AST conversion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-8433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14181571#comment-14181571 ] Sergey Shelukhin commented on HIVE-8433: ---------------------------------------- 2 non-TestSetUGIOnOnlyClient failures are unrelated, I'll look at TestSetUGIOnOnlyClient, but probably unrelated > CBO loses a column during AST conversion > ---------------------------------------- > > Key: HIVE-8433 > URL: https://issues.apache.org/jira/browse/HIVE-8433 > Project: Hive > Issue Type: Bug > Components: CBO > Reporter: Sergey Shelukhin > Assignee: Sergey Shelukhin > Priority: Critical > Attachments: HIVE-8433.01.patch, HIVE-8433.02.patch, HIVE-8433.03.patch, HIVE-8433.04.patch, HIVE-8433.patch > > > {noformat} > SELECT > CAST(value AS BINARY), > value > FROM src > ORDER BY value > LIMIT 100 > {noformat} > returns only one column. > Final CBO plan is > {noformat} > HiveSortRel(sort0=[$1], dir0=[ASC]): rowcount = 500.0, cumulative cost = {24858.432393688767 rows, 500.0 cpu, 0.0 io}, id = 44 > HiveProjectRel(value=[CAST($0):BINARY(2147483647) NOT NULL], value1=[$0]): rowcount = 500.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io}, id = 42 > HiveProjectRel(value=[$1]): rowcount = 500.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io}, id = 40 > HiveTableScanRel(table=[[default.src]]): rowcount = 500.0, cumulative cost = {0}, id = 0 > {noformat} > but the resulting AST has only one column. Must be some bug in conversion, probably related to the name collision in the schema, judging by the alias of the column for the binary-cast value in the AST > {noformat} > TOK_QUERY > TOK_FROM > TOK_SUBQUERY > TOK_QUERY > TOK_FROM > TOK_TABREF > TOK_TABNAME > default > src > src > TOK_INSERT > TOK_DESTINATION > TOK_DIR > TOK_TMP_FILE > TOK_SELECT > TOK_SELEXPR > . > TOK_TABLE_OR_COL > src > value > value > $hdt$_0 > TOK_INSERT > TOK_DESTINATION > TOK_DIR > TOK_TMP_FILE > TOK_SELECT > TOK_SELEXPR > TOK_FUNCTION > TOK_BINARY > . > TOK_TABLE_OR_COL > $hdt$_0 > value > value > TOK_ORDERBY > TOK_TABSORTCOLNAMEASC > TOK_TABLE_OR_COL > value > TOK_LIMIT > 100 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)