Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-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 770F918B50 for ; Sun, 7 Feb 2016 18:51:40 +0000 (UTC) Received: (qmail 57754 invoked by uid 500); 7 Feb 2016 18:51:40 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 57697 invoked by uid 500); 7 Feb 2016 18:51:40 -0000 Mailing-List: contact issues-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 issues@drill.apache.org Received: (qmail 57613 invoked by uid 99); 7 Feb 2016 18:51:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2016 18:51:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D6A732C1F62 for ; Sun, 7 Feb 2016 18:51:39 +0000 (UTC) Date: Sun, 7 Feb 2016 18:51:39 +0000 (UTC) From: "N Campbell (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-4366) case expression referencing columns[..] = literal fails to resolve to tru MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 N Campbell created DRILL-4366: --------------------------------- Summary: case expression referencing columns[..] = literal fails to resolve to tru Key: DRILL-4366 URL: https://issues.apache.org/jira/browse/DRILL-4366 Project: Apache Drill Issue Type: Bug Components: SQL Parser Affects Versions: 1.4.0 Reporter: N Campbell A file (i.e PSV) has one or more columns with the string literal \N. A query that projects a conditional value based on testing the columns[N] being equal never results in true. Meanwhile comparing the same literal to the result of a substring applied to the same column works. SELECT columns[0] as RNUM, columns[1], case when substr(columns[1],1,2)= '\N' then 1 else 0 end ,case when columns[1]='\N' then 1 else 0 end FROM `dfs`.`TEXT`.`./TBINT.tbl` LIMIT 100 input file TBINT.tbl 0|\N 1|-1 2|0 3|1 4|10 -- This message was sent by Atlassian JIRA (v6.3.4#6332)