quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [12/44] incubator-quickstep git commit: Added print_query gflag (#213)
Date Wed, 08 Jun 2016 19:19:04 GMT
Added print_query gflag (#213)

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

Branch: refs/heads/master
Commit: afcc9f099096e10d7476afb0838f14fe0d15dbe7
Parents: cb763ba
Author: Jianqiao Zhu <jianqiao@cs.wisc.edu>
Authored: Sat May 7 09:44:56 2016 -0500
Committer: Zuyu Zhang <zzhang@pivotal.io>
Committed: Wed Jun 8 11:57:41 2016 -0700

----------------------------------------------------------------------
 cli/QuickstepCli.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/afcc9f09/cli/QuickstepCli.cpp
----------------------------------------------------------------------
diff --git a/cli/QuickstepCli.cpp b/cli/QuickstepCli.cpp
index ec195f7..4c0a166 100644
--- a/cli/QuickstepCli.cpp
+++ b/cli/QuickstepCli.cpp
@@ -1,6 +1,8 @@
 /**
  *   Copyright 2011-2015 Quickstep Technologies LLC.
  *   Copyright 2015-2016 Pivotal Software, Inc.
+ *   Copyright 2016, Quickstep Research Group, Computer Sciences Department,
+ *     University of Wisconsin—Madison.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -144,6 +146,10 @@ DEFINE_string(worker_affinities, "",
               "means that they will all be runable on any CPU according to "
               "the kernel's own scheduling policy).");
 DEFINE_bool(initialize_db, false, "If true, initialize a database.");
+DEFINE_bool(print_query, false,
+            "Print each input query statement. This is useful when running a "
+            "large number of queries in a batch.");
+
 }  // namespace quickstep
 
 int main(int argc, char* argv[]) {
@@ -336,6 +342,10 @@ int main(int argc, char* argv[]) {
       break;
     }
 
+    if (quickstep::FLAGS_print_query) {
+      printf("\n%s\n", command_string->c_str());
+    }
+
     parser_wrapper->feedNextBuffer(command_string);
 
     bool quitting = false;


Mime
View raw message