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 EE5DE1840A for ; Tue, 16 Feb 2016 21:40:28 +0000 (UTC) Received: (qmail 16846 invoked by uid 500); 16 Feb 2016 21:40:28 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 16792 invoked by uid 500); 16 Feb 2016 21:40:28 -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 16764 invoked by uid 99); 16 Feb 2016 21:40:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 21:40:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2DE34E020D; Tue, 16 Feb 2016 21:40:28 +0000 (UTC) From: jacques-n To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request: DRILL-4287: During initial DrillTable creation... Content-Type: text/plain Message-Id: <20160216214028.2DE34E020D@git1-us-west.apache.org> Date: Tue, 16 Feb 2016 21:40:28 +0000 (UTC) Github user jacques-n commented on a diff in the pull request: https://github.com/apache/drill/pull/376#discussion_r53083386 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java --- @@ -47,6 +49,14 @@ public List files; public final String selectionRoot; + private enum StatusType { + CHECKED_DIRS, // whether we have already checked for directories + HAS_DIRS, // whether directories were found in the selection + EXPANDED_DIRS // whether this selection has been expanded to files + } + + private final BitSet dirStatus; --- End diff -- You took this differently than I meant it. My proposal was that FileSelection has various states: NOT_CHECKED_DIRS => (HAS_DIRS | NO_DIRS) => EXPANDED Doesn this lifecycle describe the state of FileSelection? This way you don't have the multi-state-management problem you currently have below with this kind of construct: fileSel.setExpanded(true); fileSel.setCheckedForDirectories(true); fileSel.setHasDirectories(false); // already expanded For each of the enumerations, we can return the right booleans that you need through enumerator constructors. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---