You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/01/24 14:35:05 UTC

[GitHub] arina-ielchiieva commented on a change in pull request #1618: DRILL-6950: Row set-based scan framework

arina-ielchiieva commented on a change in pull request #1618: DRILL-6950: Row set-based scan framework
URL: https://github.com/apache/drill/pull/1618#discussion_r250575132
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/ReaderState.java
 ##########
 @@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.physical.impl.scan;
+
+import org.apache.drill.common.exceptions.UserException;
+import org.apache.drill.exec.record.VectorContainer;
+
+/**
+ * Manages a row batch reader through its lifecycle. Created when the reader
+ * is opened, discarded when the reader is closed. Encapsulates state that
+ * follows the life of the reader. This moves common scanner state out of
+ * each reader in order to make the reader as simple as possible.
+ * <p>
+ * This class is private to the scan operator and is not meant to be used,
+ * or even visible, outside of that operator itself. Instead, all reader-specific
+ * functionality should be in the {@link RowBatchReader} subclass.
+ */
+
+class ReaderState {
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReaderState.class);
+
+  private enum State { START, LOOK_AHEAD, LOOK_AHEAD_WITH_EOF, ACTIVE, EOF, CLOSED };
 
 Review comment:
   Could you please add java-doc for each state, describing its purpose?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services