Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-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 5A3B39768 for ; Wed, 10 Dec 2014 19:48:13 +0000 (UTC) Received: (qmail 14503 invoked by uid 500); 10 Dec 2014 19:48:13 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 14449 invoked by uid 500); 10 Dec 2014 19:48:13 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 14312 invoked by uid 99); 10 Dec 2014 19:48:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2014 19:48:13 +0000 Date: Wed, 10 Dec 2014 19:48:12 +0000 (UTC) From: "Abhishek Girish (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-1836) Default length for Varchar in cast expressions should be changed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Abhishek Girish created DRILL-1836: -------------------------------------- Summary: Default length for Varchar in cast expressions should be changed Key: DRILL-1836 URL: https://issues.apache.org/jira/browse/DRILL-1836 Project: Apache Drill Issue Type: Bug Components: Execution - Data Types Reporter: Abhishek Girish Assignee: Aman Sinha Current behavior: Specify length: > select cast(t1.colfam1.col1 as varchar(10)) from table1 t1; +------------+ | EXPR$0 | +------------+ | val1 | | val21 | | val26 | +------------+ Default length for varchar in a cast expression: > select cast(t1.colfam1.col1 as varchar) from table1 t1; +------------+ | EXPR$0 | +------------+ | v | | v | | v | +------------+ When the length attribute is not specified with varchar, in a cast expression, Drill treats the default length to be 1. Postgres and SQL Server sets the default length to be 30 in such a scenario. The behavior for Drill must be modified to something similar. -- This message was sent by Atlassian JIRA (v6.3.4#6332)