You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by am...@apache.org on 2018/10/25 23:09:01 UTC

[drill] 05/08: DRILL-6381: (Part 5) Update Javadoc for a few interfaces.

This is an automated email from the ASF dual-hosted git repository.

amansinha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 3c2f9ab6c0ed290bed3bc440d72a670bbe512b5a
Author: Aman Sinha <as...@maprtech.com>
AuthorDate: Thu Sep 13 03:55:47 2018 -0700

    DRILL-6381: (Part 5) Update Javadoc for a few interfaces.
---
 .../org/apache/drill/exec/physical/base/DbSubScan.java |  4 ++--
 .../drill/exec/planner/index/IndexCollection.java      |  4 +++-
 .../drill/exec/planner/index/IndexDefinition.java      | 18 ++++++++++++++++--
 .../drill/exec/planner/index/IndexDescriptor.java      | 15 +++++++++++++++
 4 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/DbSubScan.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/DbSubScan.java
index 874468d..1977257 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/DbSubScan.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/DbSubScan.java
@@ -32,8 +32,8 @@ public interface DbSubScan extends SubScan {
   boolean isRestrictedSubScan();
 
   /**
-   * For a restricted sub-scan, this method allows associating a (hash)join instance.  A subscan within a minor
-   * fragment must have a corresponding (hash)join batch instance from which it will retrieve its set of
+   * For a restricted sub-scan, this method allows associating a rowkey join instance.  A subscan within a minor
+   * fragment must have a corresponding rowkey join batch instance from which it will retrieve its set of
    * rowkeys to perform the restricted scan.
    * @param batch
    */
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexCollection.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexCollection.java
index 9b4d170..f5ab173 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexCollection.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexCollection.java
@@ -21,7 +21,9 @@ import org.apache.calcite.rex.RexNode;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.exec.physical.base.IndexGroupScan;
 
-// Interface used to describe an index collection
+/**
+ *  Interface used to describe an index collection
+ */
 public interface IndexCollection extends Iterable<IndexDescriptor> {
   /**
    * Types of an index collections: NATIVE_SECONDARY_INDEX_COLLECTION, EXTERNAL_SECONDARY_INDEX_COLLECTION
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDefinition.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDefinition.java
index 995d23c..bfbccc2 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDefinition.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDefinition.java
@@ -26,7 +26,9 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
-// Interface used to define an index,
+/**
+ * Top level interface used to define an index.
+ */
 public interface IndexDefinition {
   /**
    * Types of an index: PRIMARY_KEY_INDEX, NATIVE_SECONDARY_INDEX, EXTERNAL_SECONDARY_INDEX
@@ -87,13 +89,25 @@ public interface IndexDefinition {
    */
   IndexType getIndexType();
 
-
+  /**
+   * Get the list of columns in the index key.
+   */
   List<LogicalExpression> getIndexColumns();
 
+  /**
+   * Get the list of columns that are in the 'included' or 'covered' fields.
+   */
   List<LogicalExpression> getNonIndexColumns();
 
+  /**
+   * Get the collation property (physical ordering) of the index.
+   */
   RelCollation getCollation();
 
+  /**
+   * Get a mapping of the LogicalExpresion/SchemaPath to its field collation
+   *  - e.g Ascending/Descending, Nulls First/Nulls Last
+   */
   Map<LogicalExpression, RelFieldCollation> getCollationMap();
 
   /**
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDescriptor.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDescriptor.java
index f355285..d43ba81 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDescriptor.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/IndexDescriptor.java
@@ -58,11 +58,26 @@ public interface IndexDescriptor extends IndexDefinition {
    */
   boolean supportsFullTextSearch();
 
+  /**
+   * Get the functional index information associated with this index (Functional indexes are
+   * indexes involving expressions e.g CAST(a as INT).
+   */
   FunctionalIndexInfo getFunctionalInfo();
 
+  /**
+   * Get the total cost of index access (I/O, CPU) in the context of the current query
+   * @param indexProps properties (metrics) of a single index in the context of current query
+   * @param planner Planner instance
+   * @param numProjectedFields Number of projected fields
+   * @param primaryGroupScan Primary table's GroupScan instance
+   * @return a RelOptCost instance representing the total cost
+   */
   public RelOptCost getCost(IndexProperties indexProps, RelOptPlanner planner,
       int numProjectedFields, GroupScan primaryGroupScan);
 
+  /**
+   * Get the costing factors associated with the storage/format plugin
+   */
   public PluginCost getPluginCostModel();
 
 }