Skip to content

Commit

Permalink
Merge 46f07a2 into c9fb4bc
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjmh committed Nov 5, 2018
2 parents c9fb4bc + 46f07a2 commit 8c10c76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.apache.carbondata.core.mutate.SegmentUpdateDetails;
import org.apache.carbondata.core.mutate.UpdateVO;
import org.apache.carbondata.core.mutate.data.BlockMappingVO;
import org.apache.carbondata.core.profiler.ExplainCollector;
import org.apache.carbondata.core.readcommitter.LatestFilesReadCommittedScope;
import org.apache.carbondata.core.readcommitter.ReadCommittedScope;
import org.apache.carbondata.core.readcommitter.TableStatusReadCommittedScope;
Expand Down Expand Up @@ -575,6 +576,8 @@ public Segment[] getSegmentsToAccess(JobContext job, ReadCommittedScope readComm
*/
public BlockMappingVO getBlockRowCount(Job job, CarbonTable table,
List<PartitionSpec> partitions) throws IOException {
// no useful information for count star query without filter, so disable explain collector
ExplainCollector.remove();
AbsoluteTableIdentifier identifier = table.getAbsoluteTableIdentifier();
TableDataMap blockletMap = DataMapStoreManager.getInstance().getDefaultDataMap(table);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ class CountStarTestCase extends QueryTest with BeforeAndAfterAll {
)
}

test("explain select count star without filter") {
CarbonProperties.getInstance()
.addProperty(CarbonCommonConstants.ENABLE_QUERY_STATISTICS, "true")

sql("explain select count(*) from filterTimestampDataType").collect()

CarbonProperties.getInstance()
.addProperty(CarbonCommonConstants.ENABLE_QUERY_STATISTICS,
CarbonCommonConstants.ENABLE_QUERY_STATISTICS_DEFAULT)
}

override def afterAll {
sql("drop table if exists filtertestTables")
sql("drop table if exists filterTimestampDataType")
Expand Down

0 comments on commit 8c10c76

Please sign in to comment.