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 01F4B200BE8 for ; Fri, 9 Dec 2016 04:12:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 00803160B27; Fri, 9 Dec 2016 03:12:00 +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 4B03F160B1F for ; Fri, 9 Dec 2016 04:11:59 +0100 (CET) Received: (qmail 3280 invoked by uid 500); 9 Dec 2016 03:11:58 -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 3263 invoked by uid 99); 9 Dec 2016 03:11:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2016 03:11:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5ADCA2C0057 for ; Fri, 9 Dec 2016 03:11:58 +0000 (UTC) Date: Fri, 9 Dec 2016 03:11:58 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4812) Wildcard queries fail on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 09 Dec 2016 03:12:00 -0000 [ https://issues.apache.org/jira/browse/DRILL-4812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Rogers updated DRILL-4812: ------------------------------- Labels: easyfix easytest ready-to-commit windows (was: easyfix easytest windows) Reviewer: Paul Rogers > Wildcard queries fail on Windows > -------------------------------- > > Key: DRILL-4812 > URL: https://issues.apache.org/jira/browse/DRILL-4812 > Project: Apache Drill > Issue Type: Bug > Components: Storage - Other > Affects Versions: 1.7.0 > Environment: Windows 7 > Reporter: Mike Lavender > Labels: easyfix, easytest, ready-to-commit, windows > > Wildcards within the path of a query are not handled on windows and result in a "String index out of range" exception. > for example: > {noformat} > 0: jdbc:drill:zk=local> SELECT SUM(qty) as num FROM dfs.parquet.`/trends/2016/1/*/*/3701`; > Error: VALIDATION ERROR: String index out of range: -1 > SQL Query null > {noformat} > ---- > The problem exists within: > exec\java-exec\src\main\java\org\apache\drill\exec\store\dfs\FileSelection.java > private static Path handleWildCard(final String root) > This function is looking for the index of the system specific PATH_SEPARATOR which on windows is '\' (from System.getProperty("file.separator")). The path passed in to handleWildcard will not ever have those type of path separators as the Path constructor (from org.apache.hadoop.fs.Path) sets all the path separators to '/'. > NOTE: > private static String removeLeadingSlash(String path) > in that same file explicitly looks for '/' and does not use the system specific PATH_SEPARATOR. -- This message was sent by Atlassian JIRA (v6.3.4#6332)