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 CBAA218935 for ; Mon, 22 Jun 2015 16:13:00 +0000 (UTC) Received: (qmail 43017 invoked by uid 500); 22 Jun 2015 16:13:00 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 42991 invoked by uid 500); 22 Jun 2015 16:13:00 -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 42981 invoked by uid 99); 22 Jun 2015 16:13:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 16:13:00 +0000 Date: Mon, 22 Jun 2015 16:13:00 +0000 (UTC) From: "Mehant Baid (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3285) Split DrillCursor.next(), clean up DrillCursor for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596136#comment-14596136 ] Mehant Baid commented on DRILL-3285: ------------------------------------ +1. > Split DrillCursor.next(), clean up DrillCursor for clarity > ---------------------------------------------------------- > > Key: DRILL-3285 > URL: https://issues.apache.org/jira/browse/DRILL-3285 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC > Reporter: Daniel Barclay (Drill) > Assignee: Mehant Baid > Fix For: 1.1.0 > > Attachments: DRILL-3285.AllPts.1.patch.txt, DRILL-3285.AllPts.2.patch.txt, DRILL-3285.AllPts.3.patch.txt, DRILL-3285.Pt1.1.patch.txt, DRILL-3285.Pt2.1.patch.txt, DRILL-3285.Pt3.1.patch.txt, DRILL-3285.Pt4.1.patch.txt, DRILL-3285.Pt5.1.patch.txt, DRILL-3285.Pt5.2.patch.txt, DRILL-3285.Pt5.3.patch.txt > > > Clean up the mess in DrillCursor, namely the poorly named (and of course undocumented) flow-control flags and the flag-laden next() method. > ========== > DRILL-3285: Part 1--Prep., Hygiene: Mainly, adding comments. > Added/edited comments: > - field doc. comments > - method doc. comments > - branch/block comments > Removed unused recordBatchCount and getRecordBatchCount(). > Added logger call for spurious batch. > Various cleanup: > - Cleaned up logger. > - Added "final" on updateColumns(). > - Wrapped some lines > - Misc. comment whitespace. > ========== > DRILL-3285: Part 2--Renaming. > Renamed state/control-flow members: > - started -> initialSchemaLoaded > - first -> beforeFirstBatch > - redoFirstNext -> returnTrueForNextCallToNext > - finished -> afterLastRow > Renamed other items: > - changed -> schemaChanged > - currentBatch -> currentBatchHolder > - DrillResultSet's currentBatch -> batchLoader > ========== > DRILL-3285: Part 3--Invert beforeFirstBatch -> ! afterFirstBatch. > ========== > DRILL-3285: Part 4--Reorder fields, updateColumns. > ========== > DRILL-3285: Part 5--Split old hacky next() into separate methods. > Split the original public next() method (which was hacked to handle an extra, > initial call to read the schema batch) into: > - new loadInitialSchema() (for handling the call for the schema) > - modified next() (for handling normal calls from ResultSet.next()) > - new private nextRowInternally() (for common code) > Pulls invariant afterFirstBatch up out of bogus-batch loop. -- This message was sent by Atlassian JIRA (v6.3.4#6332)