Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B34A4200B27 for ; Wed, 8 Jun 2016 02:02:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AFE88160A5B; Wed, 8 Jun 2016 00:02:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0E234160A5D for ; Wed, 8 Jun 2016 02:02:21 +0200 (CEST) Received: (qmail 1192 invoked by uid 500); 8 Jun 2016 00:02:21 -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 1176 invoked by uid 99); 8 Jun 2016 00:02:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 00:02:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 02CBB2C1F5D for ; Wed, 8 Jun 2016 00:02:21 +0000 (UTC) Date: Wed, 8 Jun 2016 00:02:21 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-13963) vectorization - string arguments may be converted to decimal null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Jun 2016 00:02:22 -0000 [ https://issues.apache.org/jira/browse/HIVE-13963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319735#comment-15319735 ] Sergey Shelukhin commented on HIVE-13963: ----------------------------------------- [~xuefuz] see the new Q file added in HIVE-13957. Before the fix there (that disables vectorization for IN for such cases), the vectorized query returns no results. The code in vectorization that adds casts to arguments (before evaluating them) for UDFs like IN, and gets precision and scale for the cast depending on the type, is the problem. > vectorization - string arguments may be converted to decimal null > ----------------------------------------------------------------- > > Key: HIVE-13963 > URL: https://issues.apache.org/jira/browse/HIVE-13963 > Project: Hive > Issue Type: Bug > Reporter: Sergey Shelukhin > Assignee: Matt McCline > Priority: Critical > > See HIVE-13957. > The default precision and scale for the implicit decimal cast are max,max, ie 38,38. Those don't do what the code may assume they do. All the values > 0 become invalid and precision-scale enforcement automatically converts them to null. > We need to > 1) Validate when this happens in/after the conversion code and bail; > 2) Or, derive precision and scale from the constants themselves so they all fit, instead; > 3) Or, derive it from the type of whatever caused the conversion in the first place (e.g. IN column decimal); however, this could be function-specific (e.g. IN just needs equality, BETWEEN would need at least one extra digit, arithmetic, if this ever happens, would need everything, etc.); > 4) Something else? :) -- This message was sent by Atlassian JIRA (v6.3.4#6332)