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 6905018A8C for ; Tue, 28 Jul 2015 20:11:05 +0000 (UTC) Received: (qmail 60256 invoked by uid 500); 28 Jul 2015 20:11:05 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 60174 invoked by uid 500); 28 Jul 2015 20:11:05 -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 60157 invoked by uid 99); 28 Jul 2015 20:11:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2015 20:11:04 +0000 Date: Tue, 28 Jul 2015 20:11:04 +0000 (UTC) From: "Aihua Xu (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-11392) Trailing spaces in char comparisons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Aihua Xu created HIVE-11392: ------------------------------- Summary: Trailing spaces in char comparisons Key: HIVE-11392 URL: https://issues.apache.org/jira/browse/HIVE-11392 Project: Hive Issue Type: Bug Components: Hive Affects Versions: 2.0.0 Reporter: Aihua Xu Following on HIVE-3745, for char type, hive should ignore trailing spaces for comparison while it seems not the case. {noformat} create table chtest (a char(4)); insert into chtest values ('1'); select * from chtest where a='1'; # no whitespace, produces result select * from chtest where a='1 '; # 2 spaces, no result select * from chtest where a='1 '; # 3 spaces, no result select * from chtest where a=cast('1 ' as char(4)); # any amount of spaces, cast to char of same length, produces result {noformat} It's not consistent. -- This message was sent by Atlassian JIRA (v6.3.4#6332)