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 A74D1200CF0 for ; Mon, 21 Aug 2017 21:54:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A5F2E16591B; Mon, 21 Aug 2017 19:54:13 +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 00182165913 for ; Mon, 21 Aug 2017 21:54:12 +0200 (CEST) Received: (qmail 40063 invoked by uid 500); 21 Aug 2017 19:54:12 -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 39991 invoked by uid 99); 21 Aug 2017 19:54:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2017 19:54:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7E60EC04B8 for ; Mon, 21 Aug 2017 19:54:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id MJ7zIA-KdNpS for ; Mon, 21 Aug 2017 19:54:08 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2C4326244C for ; Mon, 21 Aug 2017 19:54:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 078B0E0EE8 for ; Mon, 21 Aug 2017 19:54:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7DC72253B5 for ; Mon, 21 Aug 2017 19:54:02 +0000 (UTC) Date: Mon, 21 Aug 2017 19:54:02 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5546) Schema change problems caused by empty batch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 21 Aug 2017 19:54:13 -0000 [ https://issues.apache.org/jira/browse/DRILL-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135706#comment-16135706 ] ASF GitHub Bot commented on DRILL-5546: --------------------------------------- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/906#discussion_r134299504 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java --- @@ -329,9 +326,11 @@ public TypedFieldId getValueVectorId(SchemaPath path) { @VisibleForTesting public static class Mutator implements OutputMutator { - /** Whether schema has changed since last inquiry (via #isNewSchema}). Is - * true before first inquiry. */ - private boolean schemaChanged = true; + /** Flag keeping track whether top-level schema has changed since last inquiry (via #isNewSchema}). + * It's initialized to false, or reset to false after #isNewSchema or after #clear, until a new value vector + * or a value vector with different type is added to fieldVectorMap. + **/ + private boolean schemaChanged; --- End diff -- Using a flag is very messy. The new version uses a counter. An observer simply remembers the previous count and compares it against the current count. Allows multiple observers without negotiating over which is responsible for resetting the flag. > Schema change problems caused by empty batch > -------------------------------------------- > > Key: DRILL-5546 > URL: https://issues.apache.org/jira/browse/DRILL-5546 > Project: Apache Drill > Issue Type: Bug > Reporter: Jinfeng Ni > Assignee: Jinfeng Ni > > There have been a few JIRAs opened related to schema change failure caused by empty batch. This JIRA is opened as an umbrella for all those related JIRAS ( such as DRILL-4686, DRILL-4734, DRILL4476, DRILL-4255, etc). > -- This message was sent by Atlassian JIRA (v6.4.14#64029)