From user-return-9364-apmail-drill-user-archive=drill.apache.org@drill.apache.org Tue Jun 12 15:36:01 2018 Return-Path: X-Original-To: apmail-drill-user-archive@www.apache.org Delivered-To: apmail-drill-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B54D18677 for ; Tue, 12 Jun 2018 15:36:01 +0000 (UTC) Received: (qmail 21781 invoked by uid 500); 12 Jun 2018 15:36:00 -0000 Delivered-To: apmail-drill-user-archive@drill.apache.org Received: (qmail 21667 invoked by uid 500); 12 Jun 2018 15:36:00 -0000 Mailing-List: contact user-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@drill.apache.org Delivered-To: mailing list user@drill.apache.org Received: (qmail 21637 invoked by uid 99); 12 Jun 2018 15:36:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2018 15:36:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B2B271A04DB; Tue, 12 Jun 2018 15:35:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.87 X-Spam-Level: * X-Spam-Status: No, score=1.87 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id mHnHHC5e0Tqa; Tue, 12 Jun 2018 15:35:58 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id A8EC05F580; Tue, 12 Jun 2018 15:35:57 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id n5-v6so24177752wmc.5; Tue, 12 Jun 2018 08:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZyZxS7T+4ntMVX1hU4Ymag8YBIVUhUbWO0rnKIXem9E=; b=fur4ZA413QHacFhFzRw20m9XgbfPRTLGbjRY8VJpBjWjuRGBM2iY9nzli6hG3z7dyR 04CDFC/dL642eToyauL2N7jabc9Ph/DFLP5NJFR+3T0d0BaNs7pXJkgq1zwfDlMTZ1Ae Z6EbNuCAn8OmNYJ571Qv9ABr5oSW8eTXD5tZSP3MPvPhK0NmiYMbGijEgUe959cDsnMZ dAmPWCvTFEf8s24kdxxrqY28PtqSWaQW83WLb1cQyKnZBLaVW1QK3ldnXVt6j1tndpOT DpxSce6JSPlh9Xs3LBk3QblIUvfwnWn3mylsPz7wM8zSffrXvRTntye4aTpDVYbV8q/B gHkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZyZxS7T+4ntMVX1hU4Ymag8YBIVUhUbWO0rnKIXem9E=; b=f0xgtdkNV3qGbDWZ543AWdIrScOkTopSAczOnr3XSYHlsXFJrqiLwa23lfOCILJnqs JyLUdDecGMqJRBFYHQAkLiJnFDjNWakTdWvjvahvVe+R4Pr18B/NYNh24jRwF/0VLeUb 2tIRLKaMm784dS4/CyFoEvHHoFlY2FJLhj0ySBKaZbFts8gv/GC1iGgenZGhRNNE6BbF /micdmZk2O54ZIcIv7Fwzid2aG0VKVB9ofFuy/1X/sxRi5HHTAhoZRANewmTlVALFyIu reWCeXSxDvxaADMhVc9Sa10aAsr61hDt8C6J4C6n9L5Oq9c09n9GpWTCLw9Qs4hTEyhz Ovjg== X-Gm-Message-State: APt69E0UWjy4alLn3hoFDFPCSBKrFXGAqCH8WugWIeSF3G2aJQ9MpbuJ N4dK/nQ/EdBDq2ax6/G2v1XIfsP+V9PEwQuKWic= X-Google-Smtp-Source: ADUXVKJyejhMc1LbeN/0Y4AvCzJy/bcYkNuAL0AdJGB12JKq8xO2fXOyMXIZZadFO9TAdWgNgdSvLhXOUX94Ov0DGK0= X-Received: by 2002:a1c:1588:: with SMTP id 130-v6mr543725wmv.35.1528817750389; Tue, 12 Jun 2018 08:35:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arina Yelchiyeva Date: Tue, 12 Jun 2018 18:35:37 +0300 Message-ID: Subject: Re: [DISCUSS] case insensitive storage plugin and workspaces names To: dev@drill.apache.org Cc: user Content-Type: multipart/alternative; boundary="000000000000f0390f056e739edc" --000000000000f0390f056e739edc Content-Type: text/plain; charset="UTF-8" To make it clear we have three notions here: storage plugin name, workspace (schema) and table name (dfs.root.`/tmp/t`). My suggestion is the following: Storage plugin names to be case insensitive (DFS vs dfs, INFORMATION_SCHEMA vs information_schema). Workspace (schemas) names to be case insensitive (ROOT vs root, TMP vs tmp). Even if user has two directories /TMP and /tmp, he can create two workspaces but not both with tmp name. For example, tmp vs tmp_u. Table names case sensitivity are treated per plugin. For example, system plugins (information_schema, sys) table names (views, tables) should be case insensitive. Actually, currently for sys plugin table names are case insensitive, information_schema table names are case sensitive. That needs to be synchronized. For file system plugins table names must be case sensitive, since under table name we imply directory / file name and their case sensitivity depends on file system. Kind regards, Arina On Tue, Jun 12, 2018 at 6:13 PM Aman Sinha wrote: > Drill is dependent on the underlying file system's case sensitivity. On > HDFS one can create 'hadoop fs -mkdir /tmp/TPCH' and /tmp/tpch which are > separate directories. > These could be set as workspace in Drill's storage plugin configuration and > we would want the ability to query both. If we change the current > behavior, we would want > some way, either using back-quotes ` or other way to support that. > > RDBMSs seem to have vendor-specific behavior... > In MySQL [1] the database name and schema name are case-sensitive on Linux > and case-insensitive on Windows. Whereas in Postgres it converts the > database name and schema name to lower-case by default but one can put > double-quotes to make it case-sensitive [2]. > > [1] > https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html > [2] > http://www.postgresqlforbeginners.com/2010/11/gotcha-case-sensitivity.html > > > > On Tue, Jun 12, 2018 at 5:01 AM, Arina Yelchiyeva < > arina.yelchiyeva@gmail.com> wrote: > > > Hi all, > > > > Currently Drill we treat storage plugin names and workspaces as > > case-sensitive [1]. > > Names for storage plugins and workspaces are defined by the user. So we > > allow to create plugin -> DFS and dfs, workspace -> tmp and TMP. > > I have a suggestion to move to case insensitive approach and won't allow > > creating two plugins / workspaces with the same name in different case at > > least for the following reasons: > > 1. usually rdbms schema and table names are case insensitive and many > users > > are used to this approach; > > 2. in Drill we have INFORMATION_SCHEMA schema which is in upper case, sys > > in lower case. > > personally I find it's extremely inconvenient. > > > > Also we should consider making table names case insensitive for system > > schemas (info, sys). > > > > Any thoughts? > > > > [1] https://drill.apache.org/docs/lexical-structure/ > > > > > > Kind regards, > > Arina > > > --000000000000f0390f056e739edc--