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 004C01020F for ; Fri, 20 Feb 2015 21:26:22 +0000 (UTC) Received: (qmail 31797 invoked by uid 500); 20 Feb 2015 21:26:12 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 31734 invoked by uid 500); 20 Feb 2015 21:26:12 -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 31722 invoked by uid 500); 20 Feb 2015 21:26:12 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 31719 invoked by uid 99); 20 Feb 2015 21:26:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2015 21:26:12 +0000 Date: Fri, 20 Feb 2015 21:26:12 +0000 (UTC) From: "Aihua Xu (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9537) string expressions on a fixed length character do not preserve trailing spaces 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-9537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14329581#comment-14329581 ] Aihua Xu commented on HIVE-9537: -------------------------------- [~the6campbells] Are you satisfied with the explanation? This is considered to by design. If you are concerned about the documentation, I will find out how to get it updated to reflect your point and trailing space. Let me know. > string expressions on a fixed length character do not preserve trailing spaces > ------------------------------------------------------------------------------ > > Key: HIVE-9537 > URL: https://issues.apache.org/jira/browse/HIVE-9537 > Project: Hive > Issue Type: Bug > Components: SQL > Reporter: N Campbell > Assignee: Aihua Xu > > When a string expression such as upper or lower is applied to a fixed length column the trailing spaces of the fixed length character are not preserved. > {code:sql} > CREATE TABLE if not exists TCHAR ( > RNUM int, > CCHAR char(32) > ) > ROW FORMAT DELIMITED > FIELDS TERMINATED BY '|' > LINES TERMINATED BY '\n' > STORED AS TEXTFILE; > {code} > {{cchar}} as a {{char(32)}}. > {code:sql} > select cchar, concat(cchar, cchar), concat(lower(cchar), cchar), concat(upper(cchar), cchar) > from tchar; > {code} > 0|\N > 1| > 2| > 3|BB > 4|EE > 5|FF -- This message was sent by Atlassian JIRA (v6.3.4#6332)