quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject [3/6] incubator-quickstep git commit: Minor updates
Date Mon, 18 Sep 2017 19:33:07 GMT
Minor updates


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

Branch: refs/heads/trace
Commit: 4f4e71f7203a94e0b3ac182c70e5a6dad3dcd439
Parents: c330345
Author: Jianqiao Zhu <jianqiao@cs.wisc.edu>
Authored: Tue Sep 12 14:06:50 2017 -0500
Committer: jianqiao <jianqiao@node-2.jianqiao.quickstep-pg0.wisc.cloudlab.us>
Committed: Mon Sep 18 14:31:35 2017 -0500

----------------------------------------------------------------------
 cli/CommandExecutor.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/4f4e71f7/cli/CommandExecutor.cpp
----------------------------------------------------------------------
diff --git a/cli/CommandExecutor.cpp b/cli/CommandExecutor.cpp
index 1dfb89a..595c41b 100644
--- a/cli/CommandExecutor.cpp
+++ b/cli/CommandExecutor.cpp
@@ -443,6 +443,23 @@ void ExecuteAnalyzeRange(const PtrVector<ParseString> &arguments,
         mutable_stat->setMaxValue(attr_id, results[1]);
       }
 
+      // Get the number of tuples for the relation.
+      std::string query_string = "SELECT COUNT(*) FROM \"";
+      query_string.append(rel_name);
+      query_string.append("\";");
+
+      TypedValue num_tuples =
+          ExecuteQueryForSingleResult(main_thread_client_id,
+                                      foreman_client_id,
+                                      query_string,
+                                      bus,
+                                      storage_manager,
+                                      query_processor,
+                                      parser_wrapper.get());
+
+      DCHECK_EQ(TypeID::kLong, num_tuples.getTypeID());
+      mutable_stat->setNumTuples(num_tuples.getLiteral<std::int64_t>());
+
       mutable_stat->setExactness(true);
     }
     fprintf(out, "done\n");


Mime
View raw message