quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [23/50] [abbrv] incubator-quickstep git commit: Merging master and making changes to fit to CatalogRelationStatistics
Date Fri, 27 May 2016 03:23:14 GMT
Merging master and making changes to fit to CatalogRelationStatistics


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

Branch: refs/heads/quickstep_gen_stats
Commit: 840ef055749fa3ff66be6b730466993e130681a9
Parents: 8ddaac2 629f70c
Author: rogersjeffreyl <rl@cs.wisc.edu>
Authored: Thu May 19 15:20:20 2016 -0500
Committer: rogersjeffreyl <rl@cs.wisc.edu>
Committed: Thu May 19 15:20:20 2016 -0500

----------------------------------------------------------------------
 catalog/CMakeLists.txt                          |  11 ++
 catalog/Catalog.proto                           |  14 +-
 catalog/CatalogRelation.cpp                     |  17 +-
 catalog/CatalogRelation.hpp                     |  39 ++--
 catalog/CatalogRelationStatistics.cpp           |  49 +++++
 catalog/CatalogRelationStatistics.hpp           | 122 ++++++++++++
 cli/CMakeLists.txt                              |  22 ++-
 cli/CommandExecutor.cpp                         | 188 ++++++++++++++++++-
 cli/CommandExecutor.hpp                         |  21 ++-
 cli/PrintToScreen.cpp                           |  11 ++
 cli/PrintToScreen.hpp                           |   8 +
 cli/QuickstepCli.cpp                            |   6 +-
 cli/tests/CommandExecutorTestRunner.cpp         |   3 +
 cli/tests/command_executor/D.test               |  35 ++--
 cli/tests/command_executor/Dt.test              |  36 +++-
 query_optimizer/ExecutionGenerator.cpp          |   6 +-
 query_optimizer/QueryProcessor.hpp              |  10 +
 .../GenerateNumRowsStatsOperator.cpp            |   2 +-
 relational_operators/HashJoinOperator.cpp       |   2 +-
 storage/CMakeLists.txt                          |  21 ++-
 storage/FileManager.hpp                         |   9 +-
 storage/FileManagerHdfs.cpp                     |  57 +++---
 storage/FileManagerPosix.cpp                    |  55 +++---
 storage/FileManagerPosix.hpp                    |   6 +-
 storage/FileManagerWindows.cpp                  |  53 +++---
 storage/FileManagerWindows.hpp                  |   4 +-
 storage/SMAIndexSubBlock.cpp                    |  11 +-
 27 files changed, 642 insertions(+), 176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/840ef055/catalog/Catalog.proto
----------------------------------------------------------------------
diff --cc catalog/Catalog.proto
index 0635cb6,ce4bc2e..8e44181
--- a/catalog/Catalog.proto
+++ b/catalog/Catalog.proto
@@@ -80,6 -80,16 +80,16 @@@ message IndexScheme 
    repeated IndexEntry index_entries = 1;
  }
  
+ message CatalogRelationStatistics {
+   optional fixed64 num_tuples = 1;
 -  
++
+   message NumDistinctValuesEntry {
+     required int32 attr_id = 1;
+     required fixed64 num_distinct_values = 2;
+   }
+   repeated NumDistinctValuesEntry num_distinct_values_map = 2;
+ }
+ 
  message CatalogRelationSchema {
    required int32 relation_id = 1;
    required string name = 2;

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/840ef055/query_optimizer/ExecutionGenerator.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/840ef055/relational_operators/GenerateNumRowsStatsOperator.cpp
----------------------------------------------------------------------
diff --cc relational_operators/GenerateNumRowsStatsOperator.cpp
index 50c4ba1,0000000..074e1ca
mode 100644,000000..100644
--- a/relational_operators/GenerateNumRowsStatsOperator.cpp
+++ b/relational_operators/GenerateNumRowsStatsOperator.cpp
@@@ -1,42 -1,0 +1,42 @@@
 +/**
 + *   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.
 + *   You may obtain a copy of the License at
 + *
 + *       http://www.apache.org/licenses/LICENSE-2.0
 + *
 + *   Unless required by applicable law or agreed to in writing, software
 + *   distributed under the License is distributed on an "AS IS" BASIS,
 + *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + *   See the License for the specific language governing permissions and
 + *   limitations under the License.
 + **/
 +
 +#include "relational_operators/GenerateNumRowsStatsOperator.hpp"
 +
 +#include <memory>
 +
 +#include "catalog/CatalogRelation.hpp"
 +#include "cli/PrintToScreen.hpp"
 +
 +#include "tmb/id_typedefs.h"
 +
 +namespace quickstep {
 +
 +bool GenerateNumRowsStatsOperator::getAllWorkOrders(
 +    WorkOrdersContainer *container,
 +    QueryContext *query_context,
 +    StorageManager *storage_manager,
 +    const tmb::client_id scheduler_client_id,
 +    tmb::MessageBus *bus) {
 +  std::size_t num_tuples =
 +      PrintToScreen::GetNumTuplesInRelation(*relation_, storage_manager);
-   relation_->setNumTuples(num_tuples);
++  relation_->getStatisticsMutable()->setNumTuples(num_tuples);
 +  return true;
 +}
 +
 +}  // namespace quickstep
 +


Mime
View raw message