You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2016/12/19 21:31:43 UTC

incubator-quickstep git commit: Add comments

Repository: incubator-quickstep
Updated Branches:
  refs/heads/min-max-stats 670e2c059 -> 65732d0c6


Add comments


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/65732d0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/65732d0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/65732d0c

Branch: refs/heads/min-max-stats
Commit: 65732d0c65f84f11a0b913ad55c4a26abfca4431
Parents: 670e2c0
Author: Jianqiao Zhu <ji...@cs.wisc.edu>
Authored: Mon Dec 19 15:30:54 2016 -0600
Committer: Jianqiao Zhu <ji...@cs.wisc.edu>
Committed: Mon Dec 19 15:30:54 2016 -0600

----------------------------------------------------------------------
 cli/CommandExecutor.cpp                     | 3 +++
 relational_operators/SaveBlocksOperator.cpp | 6 ++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/65732d0c/cli/CommandExecutor.cpp
----------------------------------------------------------------------
diff --git a/cli/CommandExecutor.cpp b/cli/CommandExecutor.cpp
index dddf0f7..78bff98 100644
--- a/cli/CommandExecutor.cpp
+++ b/cli/CommandExecutor.cpp
@@ -352,6 +352,9 @@ void ExecuteAnalyze(const PtrVector<ParseString> *arguments,
       bool is_max_applicable =
           AggregateFunctionMax::Instance().canApplyToTypes({&attr_type});
 
+      // NOTE(jianqiao): Note that the relation name and the attribute names may
+      // contain non-letter characters, e.g. CREATE TABLE "with space"("1" int).
+      // So here we need to format the names with double quotes (").
       std::string query_string = "SELECT COUNT(DISTINCT \"";
       query_string.append(attr_name);
       query_string.append("\")");

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/65732d0c/relational_operators/SaveBlocksOperator.cpp
----------------------------------------------------------------------
diff --git a/relational_operators/SaveBlocksOperator.cpp b/relational_operators/SaveBlocksOperator.cpp
index ba27faa..a5a96c4 100644
--- a/relational_operators/SaveBlocksOperator.cpp
+++ b/relational_operators/SaveBlocksOperator.cpp
@@ -72,6 +72,12 @@ void SaveBlocksOperator::feedInputBlock(const block_id input_block_id, const rel
 }
 
 void SaveBlocksOperator::updateCatalogOnCompletion() {
+  // Note(jianqiao): We need to reset the exactness flag whenever a stored
+  // relation gets changed. Given the pre-condition that all the data manipulation
+  // operations (insert, delete, update, copy) use this SaveBlocksOperator as a
+  // common routine. It is valid to put the updating call here to minimize the
+  // changes to other relational operators (e.g. InsertOperator, DeleteOperator,
+  // TextScanOperator, SelectOperator, etc.).
   relation_->getStatisticsMutable()->setExactness(false);
 }