Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-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 9FD0517C30 for ; Wed, 8 Apr 2015 20:54:12 +0000 (UTC) Received: (qmail 68224 invoked by uid 500); 8 Apr 2015 20:54:12 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 68204 invoked by uid 500); 8 Apr 2015 20:54:12 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 68194 invoked by uid 99); 8 Apr 2015 20:54:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 20:54:12 +0000 Date: Wed, 8 Apr 2015 20:54:12 +0000 (UTC) From: "Laljo John Pullokkaran (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-10190) CBO: AST mode checks for TABLESAMPLE with AST.toString().contains("TOK_TABLESPLITSAMPLE") 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-10190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14486008#comment-14486008 ] Laljo John Pullokkaran commented on HIVE-10190: ----------------------------------------------- [~pxiong] Could you take a look? > CBO: AST mode checks for TABLESAMPLE with AST.toString().contains("TOK_TABLESPLITSAMPLE") > ----------------------------------------------------------------------------------------- > > Key: HIVE-10190 > URL: https://issues.apache.org/jira/browse/HIVE-10190 > Project: Hive > Issue Type: Bug > Components: CBO > Affects Versions: 1.2.0 > Reporter: Gopal V > Assignee: Pengcheng Xiong > Priority: Trivial > Labels: perfomance > > {code} > public static boolean validateASTForUnsupportedTokens(ASTNode ast) { > String astTree = ast.toStringTree(); > // if any of following tokens are present in AST, bail out > String[] tokens = { "TOK_CHARSETLITERAL", "TOK_TABLESPLITSAMPLE" }; > for (String token : tokens) { > if (astTree.contains(token)) { > return false; > } > } > return true; > } > {code} > This is an issue for a SQL query which is bigger in AST form than in text (~700kb). -- This message was sent by Atlassian JIRA (v6.3.4#6332)