incubator-quickstep git commit: Fix a bug of filter side in HashJoinOperator
Repository: incubator-quickstep Updated Branches: refs/heads/master dfefe6293 -> 97bef178f Fix a bug of filter side in HashJoinOperator Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/97bef178 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/97bef178 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/97bef178 Branch: refs/heads/master Commit: 97bef178fe403e14ebb304e60006fda2e988aac4 Parents: dfefe62 Author: Jianqiao Zhu Authored: Sun Jun 3 15:38:36 2018 -0500 Committer: Jianqiao Zhu Committed: Tue Jun 5 00:15:38 2018 -0500 -- autofix_cmakelists.py | 11 ++-- .../tests/execution_generator/Join.test | 59 relational_operators/HashJoinOperator.cpp | 12 ++-- storage/CMakeLists.txt | 13 ++--- 4 files changed, 77 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/97bef178/autofix_cmakelists.py -- diff --git a/autofix_cmakelists.py b/autofix_cmakelists.py index 17ef588..ec19408 100755 --- a/autofix_cmakelists.py +++ b/autofix_cmakelists.py @@ -19,6 +19,7 @@ import os import re +import sys from collections import defaultdict @@ -1356,7 +1357,7 @@ class CMakeLists: self.path = path if "CMakeLists.txt" in os.listdir(path): - with open(self.path + "/CMakeLists.txt", "rb") as file: + with open(self.path + "/CMakeLists.txt", "r") as file: self.root = CMakeGroup(LineStream(file.readlines())) self.newfile = False else: @@ -1524,8 +1525,8 @@ class CMakeLists: continue if name in subdirectories: -print "Warning: Possibly duplicated add_subdirectory(" + \ - name + ") in", self.path +sys.stdout.write("Warning: Possibly duplicated add_subdirectory(" + + name + ") in" + self.path) subdirectories[name] = node @@ -1690,7 +1691,7 @@ class CMakeLists: if len(output) == 0: return -with open(self.path + "/CMakeLists.txt", "wb") as file: +with open(self.path + "/CMakeLists.txt", "w") as file: file.write("".join(output)) file.close() @@ -1754,7 +1755,7 @@ class SourceFile: self.includes = [] # Parse include items -with open(self.path + "/" + self.name, "rb") as file: +with open(self.path + "/" + self.name, "r") as file: dependencies = [] for line in file: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/97bef178/query_optimizer/tests/execution_generator/Join.test -- diff --git a/query_optimizer/tests/execution_generator/Join.test b/query_optimizer/tests/execution_generator/Join.test index c26b915..5ef8e99 100644 --- a/query_optimizer/tests/execution_generator/Join.test +++ b/query_optimizer/tests/execution_generator/Join.test @@ -231,3 +231,62 @@ WHERE b.x > 10 +---++++ | 6| 61| 601| C6| +---++++ +== + +# Semi-join w/o residual predicates +SELECT SUM(x) +FROM a +WHERE w IN (SELECT w FROM b); +-- +++ +|SUM(x) | +++ +| 900| +++ +== + +# Semi-join w/ residual predicates +SELECT SUM(x) +FROM a +WHERE EXISTS ( + SELECT * + FROM b + WHERE a.w = b.w +AND a.x < b.x +); +-- +++ +|SUM(x) | +++ +| 500| +++ +== + +# Anti-join w/o residual predicates +SELECT SUM(x) +FROM a +WHERE w NOT IN (SELECT w FROM b); +-- +++ +|SUM(x) | +++ +|1000| +++ +== + +# Anti-join w residual predicates +SELECT SUM(x) +FROM a +WHERE NOT EXISTS ( + SELECT * + FROM b + WHERE a.w = b.w +AND a.x < b.x +); +-- +++ +|SUM(x) | +++ +|1400| +++ +== http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/97bef178/relational_operators/HashJoinOperator.cpp -- diff --git a/relational_operators/HashJoinOperator.cpp b/relational_operators/HashJoinOperator.cpp index f08de9d..a6283a8 100644 --- a/relational_operators/HashJoinOperator.cpp +++ b/relational_operators/HashJoinOperator.cpp @@ -733,9 +733,9 @@ void HashSemiJoinWorkOrder::executeWithResidualPredicate() { build
incubator-quickstep git commit: Data Provider thread added.
Repository: incubator-quickstep Updated Branches: refs/heads/master 835281ae8 -> dfefe6293 Data Provider thread added. - Thread used for receiving block requests from clients and sending the contents of a block back to the client. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/dfefe629 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/dfefe629 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/dfefe629 Branch: refs/heads/master Commit: dfefe62934c5c890650606782b50714cb2eb0366 Parents: 835281a Author: Harshad Deshmukh Authored: Fri Apr 6 16:00:54 2018 -0500 Committer: Harshad Deshmukh Committed: Mon Jun 4 16:45:31 2018 -0500 -- CMakeLists.txt| 6 +- query_execution/QueryExecutionTypedefs.hpp| 4 + storage/BlockWire.proto | 34 + storage/CMakeLists.txt| 69 - storage/DataProviderThread.cpp| 92 +++ storage/DataProviderThread.hpp| 103 + storage/StorageManager.cpp| 23 +++ storage/StorageManager.hpp| 17 ++- storage/tests/DataProviderThread_unittest.cpp | 169 + 9 files changed, 512 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/dfefe629/CMakeLists.txt -- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f1c6cd..434019e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -702,7 +702,9 @@ set(ENABLE_MEMORYMIRROR OFF CACHE BOOL "Enable MemoryMirror TMB") set(ENABLE_NATIVELOG OFF CACHE BOOL "Enable NativeLog TMB") # The distributed version requires to use the NativeNet implementation. -if (NOT ENABLE_DISTRIBUTED) +if (ENABLE_DISTRIBUTED OR ENABLE_NETWORK_CLI) + set(ENABLE_NATIVENET ON CACHE BOOL "Enable NativeNet TMB") +else() set(ENABLE_NATIVENET OFF CACHE BOOL "Enable NativeNet TMB") endif() @@ -713,7 +715,7 @@ set(ENABLE_ZOOKEEPER OFF CACHE BOOL "Enable Zookeeper TMB") add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/tmb" "${CMAKE_CURRENT_BINARY_DIR}/third_party/tmb") include_directories(${TMB_INCLUDE_DIRS}) -if (ENABLE_DISTRIBUTED) +if (ENABLE_DISTRIBUTED OR ENABLE_NETWORK_CLI) include_directories(${CMAKE_CURRENT_BINARY_DIR}/third_party/tmb/include) endif() http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/dfefe629/query_execution/QueryExecutionTypedefs.hpp -- diff --git a/query_execution/QueryExecutionTypedefs.hpp b/query_execution/QueryExecutionTypedefs.hpp index 80da7c5..ea4f8d2 100644 --- a/query_execution/QueryExecutionTypedefs.hpp +++ b/query_execution/QueryExecutionTypedefs.hpp @@ -81,6 +81,10 @@ enum QueryExecutionMessageType : message_type_id { kRebuildWorkOrderMessage, // From Foreman to Worker. kRebuildWorkOrderCompleteMessage, // From Worker to Foreman. kWorkloadCompletionMessage, // From Foreman to main thread. + kBlockRequestMessage, // To DataProviderThread. + kBlockResponseMessage, // From DataProviderThread. + kFinishReadingRelationMessage, // To DataProviderThread. + kPoisonMessage, // From the main thread to Foreman and Workers. #ifdef QUICKSTEP_DISTRIBUTED http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/dfefe629/storage/BlockWire.proto -- diff --git a/storage/BlockWire.proto b/storage/BlockWire.proto new file mode 100644 index 000..c1a1763 --- /dev/null +++ b/storage/BlockWire.proto @@ -0,0 +1,34 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you 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. + +syntax = "proto2"; + +package quickstep; + +message BlockResponse { + required bool is_valid = 1; + required bytes block = 2; +} + +message BlockRequest { + required uint64 block_id = 1; + required int32 relation_id = 2; +} + +message FinishReadingRelationMessa
incubator-quickstep git commit: Fixed the command execution bug in the distributed version.
Repository: incubator-quickstep Updated Branches: refs/heads/master 8b7c38010 -> 835281ae8 Fixed the command execution bug in the distributed version. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/835281ae Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/835281ae Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/835281ae Branch: refs/heads/master Commit: 835281ae894eadfdd121e444313bbf001e9b884b Parents: 8b7c380 Author: Zuyu Zhang Authored: Mon May 21 16:39:42 2018 -0500 Committer: Zuyu Zhang Committed: Mon May 21 16:47:52 2018 -0500 -- cli/tests/CMakeLists.txt| 8 +- cli/tests/CommandExecutorTestRunner.cpp | 2 +- cli/tests/DistributedCommandExecutorTest.cpp| 2 - .../DistributedCommandExecutorTestRunner.cpp| 87 +++- .../DistributedCommandExecutorTestRunner.hpp| 15 +--- cli/tests/command_executor/CMakeLists.txt | 6 ++ cli/tests/command_executor/D.test | 25 ++ cli/tests/command_executor/Dt.test | 8 ++ 8 files changed, 60 insertions(+), 93 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/835281ae/cli/tests/CMakeLists.txt -- diff --git a/cli/tests/CMakeLists.txt b/cli/tests/CMakeLists.txt index c450e4d..18d321d 100644 --- a/cli/tests/CMakeLists.txt +++ b/cli/tests/CMakeLists.txt @@ -76,8 +76,9 @@ if (ENABLE_DISTRIBUTED) glog gtest quickstep_catalog_CatalogTypedefs -quickstep_cli_CommandExecutorUtil +quickstep_cli_CommandExecutor quickstep_cli_Constants +quickstep_cli_DefaultsConfigurator quickstep_cli_DropRelation quickstep_cli_PrintToScreen quickstep_parser_ParseStatement @@ -90,11 +91,10 @@ if (ENABLE_DISTRIBUTED) quickstep_queryexecution_Shiftboss quickstep_queryexecution_Worker quickstep_queryexecution_WorkerDirectory -quickstep_queryoptimizer_Optimizer -quickstep_queryoptimizer_OptimizerContext quickstep_queryoptimizer_QueryHandle -quickstep_queryoptimizer_tests_TestDatabaseLoader +quickstep_queryoptimizer_QueryProcessor quickstep_storage_DataExchangerAsync +quickstep_storage_StorageConstants quickstep_storage_StorageManager quickstep_utility_Macros quickstep_utility_MemStream http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/835281ae/cli/tests/CommandExecutorTestRunner.cpp -- diff --git a/cli/tests/CommandExecutorTestRunner.cpp b/cli/tests/CommandExecutorTestRunner.cpp index 4ab94d8..a8307db 100644 --- a/cli/tests/CommandExecutorTestRunner.cpp +++ b/cli/tests/CommandExecutorTestRunner.cpp @@ -69,7 +69,7 @@ void CommandExecutorTestRunner::runTestCase( std::printf("%s\n", parse_statement.toString().c_str()); try { if (parse_statement.getStatementType() == ParseStatement::kCommand) { - quickstep::cli::executeCommand( + cli::executeCommand( *result.parsed_statement, *query_processor_->getDefaultDatabase(), main_thread_client_id_, http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/835281ae/cli/tests/DistributedCommandExecutorTest.cpp -- diff --git a/cli/tests/DistributedCommandExecutorTest.cpp b/cli/tests/DistributedCommandExecutorTest.cpp index b41a70f..c8574b9 100644 --- a/cli/tests/DistributedCommandExecutorTest.cpp +++ b/cli/tests/DistributedCommandExecutorTest.cpp @@ -49,8 +49,6 @@ int main(int argc, char** argv) { auto test_runner = make_unique(argv[3]); test_driver = make_unique(&input_file, test_runner.get()); - test_driver->registerOption( - quickstep::DistributedCommandExecutorTestRunner::kResetOption); ::testing::InitGoogleTest(&argc, argv); const int success = RUN_ALL_TESTS(); http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/835281ae/cli/tests/DistributedCommandExecutorTestRunner.cpp -- diff --git a/cli/tests/DistributedCommandExecutorTestRunner.cpp b/cli/tests/DistributedCommandExecutorTestRunner