----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21165/#review42453 -----------------------------------------------------------
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillPushProjIntoScan.java <https://reviews.apache.org/r/21165/#comment76260> Since the new Scan has the same rowtype as the original scan node, and we get the column count from RowType, when we compute the cost for this scan operator, I wonder if may lead to the same cost for the new scan and old scan operator. As a result, the new scan may not be chosen by optiq optimizer. Probably, we need modify the code of getting column count in DrillScanRel.computeSelfCost(). exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PrelUtil.java <https://reviews.apache.org/r/21165/#comment76259> Here, we override visitCall() in this visitor class. Do you think we override visitOver()? RexOver extendes RexCall, and also contains operands, though currently we do not support window function yet. exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PrelUtil.java <https://reviews.apache.org/r/21165/#comment76257> For RexLiteral, I think we had better use literal.getType().getSqlTypeName(). literal.getTypeName() returns a broad type of the literal. For example, all exact numbers, including integers have typeName "Decimal". If we use getTypeName(), then f[12.3] will also be pushed down into scan? exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PrelUtil.java <https://reviews.apache.org/r/21165/#comment76256> If we have a string literal in the query, then, this code will return a NamedSegment, and put the NamedSegment into the pushed column lists. For instance, select 'abc', 'cde', regular_column from cp.`data.parquet` if table happens to have column named 'abc', 'cde', then, the pushed columns means unnecessary scan cost. - Jinfeng Ni On May 7, 2014, 9:34 a.m., Aditya Kishore wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21165/ > ----------------------------------------------------------- > > (Updated May 7, 2014, 9:34 a.m.) > > > Review request for drill, Jinfeng Ni and Steven Phillips. > > > Bugs: DRILL-626 > https://issues.apache.org/jira/browse/DRILL-626 > > > Repository: drill-git > > > Description > ------- > > If a query against an HBase table requires only a subset of columns, we > should qualify the HBase scan with these columns. > > For example > > SELECT row_key, f['c1'], f['c2'], g FROM hbase.MyTable > > should qualify the HBase scan as families => [g["ALL"], f["c1", "c2"]] > > > Diffs > ----- > > > common/src/main/java/org/apache/drill/common/exceptions/DrillRuntimeException.java > 9266cdd > > contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseGroupScan.java > bcdebc3 > > contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseRecordReader.java > aa5743f > > contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSubScan.java > ceaf23f > > contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java > PRE-CREATION > > contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestHBaseFilterPushDown.java > 1911078 > > contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestHBaseProjectPushDown.java > PRE-CREATION > > exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScan.java > cd78bc1 > > exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/GroupScan.java > 492dbc1 > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillPushProjIntoScan.java > 0eae1da > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PrelUtil.java > d69f8cf > > exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java > f94cff8 > exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/HiveScan.java > 2972928 > > exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaGroupScan.java > 5202038 > > exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java > 4d4ec9b > > Diff: https://reviews.apache.org/r/21165/diff/ > > > Testing > ------- > > > Thanks, > > Aditya Kishore > >
