quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [4/4] incubator-quickstep git commit: Fix and rearrange all CMakeLists.txt so that they are ready to be processed and regenrated by an automation tool.
Date Fri, 27 Apr 2018 23:49:19 GMT
Fix and rearrange all CMakeLists.txt so that they are ready to be processed and regenrated by an automation tool.


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

Branch: refs/heads/master
Commit: b17856474bf5f60dbee8d1874c2d11c55fa26f8d
Parents: c2e2691
Author: Jianqiao Zhu <jianqiao@cs.wisc.edu>
Authored: Wed Apr 18 00:54:31 2018 -0500
Committer: Jianqiao Zhu <jianqiao@cs.wisc.edu>
Committed: Fri Apr 27 17:18:25 2018 -0500

----------------------------------------------------------------------
 CMakeLists.txt                                  |  35 +-
 catalog/CMakeLists.txt                          |  74 +--
 cli/CMakeLists.txt                              |  87 +--
 cli/distributed/CMakeLists.txt                  |   4 +-
 cli/tests/CMakeLists.txt                        |  10 +-
 compression/CMakeLists.txt                      |   4 +-
 expressions/CMakeLists.txt                      |   7 +-
 expressions/aggregation/CMakeLists.txt          |  12 +-
 expressions/predicate/CMakeLists.txt            |   1 +
 expressions/scalar/CMakeLists.txt               |   4 +
 expressions/table_generator/CMakeLists.txt      |  35 +-
 expressions/window_aggregation/CMakeLists.txt   |  10 +-
 parser/CMakeLists.txt                           |  37 +-
 parser/tests/CMakeLists.txt                     |   9 +-
 query_execution/CMakeLists.txt                  | 332 ++++++-----
 query_optimizer/CMakeLists.txt                  |  17 +-
 query_optimizer/cost_model/CMakeLists.txt       |   1 +
 query_optimizer/expressions/CMakeLists.txt      |  17 +-
 query_optimizer/logical/CMakeLists.txt          |  12 +-
 query_optimizer/physical/CMakeLists.txt         |   5 +-
 query_optimizer/resolver/CMakeLists.txt         |   2 +-
 query_optimizer/rules/CMakeLists.txt            |  60 +-
 query_optimizer/rules/Partition.hpp             |   2 -
 query_optimizer/rules/tests/CMakeLists.txt      |   6 +-
 query_optimizer/strategy/tests/CMakeLists.txt   |   4 +-
 query_optimizer/tests/CMakeLists.txt            |  17 +-
 .../tests/logical_generator/CMakeLists.txt      |   6 +-
 .../tests/physical_generator/CMakeLists.txt     |   6 +-
 query_optimizer/tests/resolver/CMakeLists.txt   |   6 +-
 relational_operators/CMakeLists.txt             |  66 ++-
 storage/CMakeLists.txt                          | 565 ++++++++++---------
 storage/TupleStorageSubBlock.cpp                |  11 +-
 threading/CMakeLists.txt                        |  44 +-
 transaction/CMakeLists.txt                      |  19 +-
 types/CMakeLists.txt                            |  21 +-
 types/containers/CMakeLists.txt                 |   8 +-
 types/operations/CMakeLists.txt                 |   4 +-
 .../ArithmeticBinaryOperators.hpp               |   4 -
 .../operations/binary_operations/CMakeLists.txt |   1 +
 .../comparisons/AsciiStringComparators-inl.hpp  |   4 -
 types/operations/comparisons/CMakeLists.txt     |   8 +-
 types/operations/comparisons/Comparison-inl.hpp |   4 -
 types/operations/comparisons/Comparison.cpp     |   2 -
 .../comparisons/LiteralComparators-inl.hpp      |   4 -
 .../PatternMatchingComparators-inl.hpp          |   4 -
 .../ArithmeticUnaryOperators.hpp                |   4 -
 .../operations/unary_operations/CMakeLists.txt  |  21 +-
 .../unary_operations/DateExtractOperation.cpp   |   6 +-
 .../unary_operations/DateExtractOperation.hpp   |   6 +-
 .../unary_operations/UnaryOperation.hpp         |   6 +-
 types/port/CMakeLists.txt                       |   8 +-
 types/port/gmtime_r.hpp                         |   3 -
 types/port/localtime_r.hpp                      |   3 -
 utility/CMakeLists.txt                          | 124 ++--
 utility/lip_filter/CMakeLists.txt               |   9 +-
 yarn/CMakeLists.txt                             |   1 -
 56 files changed, 912 insertions(+), 870 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1343a18..3f1c6cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -625,8 +625,8 @@ include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR})
 
 # Add gtest unit-testing framework.
 set(gtest_force_shared_crt ON CACHE BOOL "Link gtest against shared DLLs on Windows")
-add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/googletest/googletest"
-                  "${CMAKE_CURRENT_BINARY_DIR}/third_party/googletest/googletest")
+add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/googletest/googletest"
+                 "${CMAKE_CURRENT_BINARY_DIR}/third_party/googletest/googletest")
 include_directories(SYSTEM "${THIRD_PARTY_SOURCE_DIR}/googletest/googletest/include")
 enable_testing()
 
@@ -644,18 +644,18 @@ if (UNIX)
                     "itself, as well as unit tests and other utilities are "
                     "not affected.")
   endif()
-  add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/benchmark" "${CMAKE_CURRENT_BINARY_DIR}/third_party/benchmark")
+  add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/benchmark" "${CMAKE_CURRENT_BINARY_DIR}/third_party/benchmark")
   include_directories("${THIRD_PARTY_SOURCE_DIR}/benchmark/include")
 endif()
 
 # Add required cmake-controlled third-party libraries (farmhash, gflags, glog, and re2).
-add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/farmhash" "${CMAKE_CURRENT_BINARY_DIR}/third_party/farmhash")
+add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/farmhash" "${CMAKE_CURRENT_BINARY_DIR}/third_party/farmhash")
 include_directories("${THIRD_PARTY_SOURCE_DIR}")
 
-add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/gflags" "${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags")
+add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/gflags" "${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags")
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include")
 
-add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/glog" "${CMAKE_CURRENT_BINARY_DIR}/third_party/glog")
+add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/glog" "${CMAKE_CURRENT_BINARY_DIR}/third_party/glog")
 if (WIN32)
   set_property(
     DIRECTORY
@@ -668,7 +668,7 @@ else()
 endif()
 
 include_directories("${THIRD_PARTY_SOURCE_DIR}/re2")
-add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/re2" "${CMAKE_CURRENT_BINARY_DIR}/third_party/re2")
+add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/re2" "${CMAKE_CURRENT_BINARY_DIR}/third_party/re2")
 
 # Add optional linenoise command-line editing library.
 if (USE_LINENOISE)
@@ -679,7 +679,7 @@ if (USE_LINENOISE)
                     "to fail, in which case you should try again with "
                     "-D USE_LINENOISE=0")
   endif()
-  add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/linenoise" "${CMAKE_CURRENT_BINARY_DIR}/third_party/linenoise")
+  add_subdirectory("${THIRD_PARTY_SOURCE_DIR}/linenoise" "${CMAKE_CURRENT_BINARY_DIR}/third_party/linenoise")
 endif()
 
 # Add optional libhdfs3 library
@@ -735,7 +735,8 @@ add_subdirectory(utility)
 add_subdirectory(yarn)
 
 # Build the quickstep_cli_shell executable.
-add_executable (quickstep_cli_shell cli/QuickstepCli.cpp)
+add_executable(quickstep_cli_shell cli/QuickstepCli.cpp)
+
 # Link against direct deps (will transitively pull in everything needed).
 target_link_libraries(quickstep_cli_shell
                       ${GFLAGS_LIB_NAME}
@@ -783,12 +784,14 @@ target_link_libraries(quickstep_cli_shell ${LIBS})
 
 if (ENABLE_DISTRIBUTED)
   # Build the quickstep_distributed_cli_shell executable.
-  add_executable (quickstep_distributed_cli_shell
-                  cli/distributed/Cli.hpp
-                  cli/distributed/Cli.cpp
-                  cli/distributed/QuickstepDistributedCli.cpp)
+  add_executable(quickstep_distributed_cli_shell
+                 cli/distributed/Cli.hpp
+                 cli/distributed/Cli.cpp
+                 cli/distributed/QuickstepDistributedCli.cpp)
   # Link against direct deps (will transitively pull in everything needed).
   target_link_libraries(quickstep_distributed_cli_shell
+                        ${GFLAGS_LIB_NAME}
+                        ${GRPCPLUSPLUS_LIBRARIES}
                         glog
                         quickstep_catalog_CatalogRelation
                         quickstep_cli_Constants
@@ -811,13 +814,11 @@ if (ENABLE_DISTRIBUTED)
                         quickstep_utility_Macros
                         quickstep_utility_SqlError
                         quickstep_utility_StringUtil
-                        tmb
-                        ${GFLAGS_LIB_NAME}
-                        ${GRPCPLUSPLUS_LIBRARIES})
+                        tmb)
 endif(ENABLE_DISTRIBUTED)
 
 if (ENABLE_NETWORK_CLI)
-  add_executable (quickstep_client cli/NetworkCliClientMain.cpp)
+  add_executable(quickstep_client cli/NetworkCliClientMain.cpp)
   target_link_libraries(quickstep_client
                         ${GFLAGS_LIB_NAME}
                         ${GRPCPLUSPLUS_LIBRARIES}

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/catalog/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/catalog/CMakeLists.txt b/catalog/CMakeLists.txt
index 414d736..a1e4ba6 100644
--- a/catalog/CMakeLists.txt
+++ b/catalog/CMakeLists.txt
@@ -28,7 +28,6 @@ QS_PROTOBUF_GENERATE_CPP(catalog_Catalog_proto_srcs catalog_Catalog_proto_hdrs C
 
 # Declare micro-libs:
 add_library(quickstep_catalog_Catalog Catalog.cpp Catalog.hpp)
-add_library(quickstep_catalog_Catalog_proto ${catalog_Catalog_proto_srcs})
 add_library(quickstep_catalog_CatalogAttribute CatalogAttribute.cpp CatalogAttribute.hpp)
 add_library(quickstep_catalog_CatalogDatabase CatalogDatabase.cpp CatalogDatabase.hpp)
 add_library(quickstep_catalog_CatalogDatabaseCache CatalogDatabaseCache.cpp CatalogDatabaseCache.hpp)
@@ -42,12 +41,14 @@ add_library(quickstep_catalog_CatalogRelationStatistics
             CatalogRelationStatistics.cpp
             CatalogRelationStatistics.hpp)
 add_library(quickstep_catalog_CatalogTypedefs ../empty_src.cpp CatalogTypedefs.hpp)
+add_library(quickstep_catalog_Catalog_proto ${catalog_Catalog_proto_srcs})
 add_library(quickstep_catalog_IndexScheme IndexScheme.cpp IndexScheme.hpp)
+add_library(quickstep_catalog_PartitionScheme PartitionScheme.cpp PartitionScheme.hpp)
+add_library(quickstep_catalog_PartitionSchemeHeader PartitionSchemeHeader.cpp PartitionSchemeHeader.hpp)
+
 if(QUICKSTEP_HAVE_LIBNUMA)
   add_library(quickstep_catalog_NUMAPlacementScheme NUMAPlacementScheme.cpp NUMAPlacementScheme.hpp)
 endif()
-add_library(quickstep_catalog_PartitionScheme PartitionScheme.cpp PartitionScheme.hpp)
-add_library(quickstep_catalog_PartitionSchemeHeader PartitionSchemeHeader.cpp PartitionSchemeHeader.hpp)
 
 # Link dependencies:
 target_link_libraries(quickstep_catalog_Catalog
@@ -58,11 +59,6 @@ target_link_libraries(quickstep_catalog_Catalog
                       quickstep_catalog_Catalog_proto
                       quickstep_utility_Macros
                       quickstep_utility_PtrVector)
-target_link_libraries(quickstep_catalog_Catalog_proto
-                      quickstep_storage_StorageBlockLayout_proto
-                      quickstep_types_Type_proto
-                      quickstep_types_TypedValue_proto
-                      ${PROTOBUF_LIBRARY})
 target_link_libraries(quickstep_catalog_CatalogAttribute
                       glog
                       quickstep_catalog_CatalogTypedefs
@@ -118,6 +114,16 @@ target_link_libraries(quickstep_catalog_CatalogRelation
                       quickstep_threading_SpinSharedMutex
                       quickstep_utility_Macros
                       quickstep_utility_PtrVector)
+target_link_libraries(quickstep_catalog_CatalogRelationSchema
+                      glog
+                      quickstep_catalog_CatalogAttribute
+                      quickstep_catalog_CatalogErrors
+                      quickstep_catalog_CatalogTypedefs
+                      quickstep_catalog_Catalog_proto
+                      quickstep_types_Type
+                      quickstep_utility_Macros
+                      quickstep_utility_PtrVector
+                      quickstep_utility_StringUtil)
 target_link_libraries(quickstep_catalog_CatalogRelationStatistics
                       quickstep_catalog_CatalogTypedefs
                       quickstep_catalog_Catalog_proto
@@ -125,36 +131,17 @@ target_link_libraries(quickstep_catalog_CatalogRelationStatistics
                       quickstep_types_NullType
                       quickstep_types_TypedValue
                       quickstep_utility_Macros)
+target_link_libraries(quickstep_catalog_Catalog_proto
+                      ${PROTOBUF_LIBRARY}
+                      quickstep_storage_StorageBlockLayout_proto
+                      quickstep_types_Type_proto
+                      quickstep_types_TypedValue_proto)
 target_link_libraries(quickstep_catalog_IndexScheme
                       glog
                       quickstep_catalog_Catalog_proto
                       quickstep_storage_IndexSubBlockDescriptionFactory
                       quickstep_storage_StorageBlockLayout_proto
                       quickstep_utility_Macros)
-
-if(QUICKSTEP_HAVE_LIBNUMA)
-target_link_libraries(quickstep_catalog_CatalogRelation
-                      quickstep_catalog_NUMAPlacementScheme)
-endif()
-target_link_libraries(quickstep_catalog_CatalogRelationSchema
-                      glog
-                      quickstep_catalog_CatalogAttribute
-                      quickstep_catalog_CatalogErrors
-                      quickstep_catalog_CatalogTypedefs
-                      quickstep_catalog_Catalog_proto
-                      quickstep_types_Type
-                      quickstep_utility_Macros
-                      quickstep_utility_PtrVector
-                      quickstep_utility_StringUtil)
-if(QUICKSTEP_HAVE_LIBNUMA)
-target_link_libraries(quickstep_catalog_NUMAPlacementScheme
-                      glog
-                      quickstep_catalog_CatalogTypedefs
-                      quickstep_catalog_Catalog_proto
-                      quickstep_storage_StorageBlockInfo
-                      quickstep_utility_Macros
-                      ${LIBNUMA_LIBRARY})
-endif()
 target_link_libraries(quickstep_catalog_PartitionScheme
                       glog
                       quickstep_catalog_CatalogTypedefs
@@ -184,11 +171,22 @@ target_link_libraries(quickstep_catalog_PartitionSchemeHeader
                       quickstep_utility_CompositeHash
                       quickstep_utility_Macros)
 
+if(QUICKSTEP_HAVE_LIBNUMA)
+  target_link_libraries(quickstep_catalog_CatalogRelation
+                        quickstep_catalog_NUMAPlacementScheme)
+  target_link_libraries(quickstep_catalog_NUMAPlacementScheme
+                        ${LIBNUMA_LIBRARY}
+                        glog
+                        quickstep_catalog_CatalogTypedefs
+                        quickstep_catalog_Catalog_proto
+                        quickstep_storage_StorageBlockInfo
+                        quickstep_utility_Macros)
+endif()
+
 # Module all-in-one library:
 add_library(quickstep_catalog ../empty_src.cpp CatalogModule.hpp)
 target_link_libraries(quickstep_catalog
                       quickstep_catalog_Catalog
-                      quickstep_catalog_Catalog_proto
                       quickstep_catalog_CatalogAttribute
                       quickstep_catalog_CatalogDatabase
                       quickstep_catalog_CatalogDatabaseCache
@@ -198,12 +196,14 @@ target_link_libraries(quickstep_catalog
                       quickstep_catalog_CatalogRelationSchema
                       quickstep_catalog_CatalogRelationStatistics
                       quickstep_catalog_CatalogTypedefs
+                      quickstep_catalog_Catalog_proto
                       quickstep_catalog_IndexScheme
                       quickstep_catalog_PartitionScheme
                       quickstep_catalog_PartitionSchemeHeader)
+
 if(QUICKSTEP_HAVE_LIBNUMA)
-target_link_libraries(quickstep_catalog
-                      quickstep_catalog_NUMAPlacementScheme)
+  target_link_libraries(quickstep_catalog
+                        quickstep_catalog_NUMAPlacementScheme)
 endif()
 
 # Tests:
@@ -261,12 +261,12 @@ if(QUICKSTEP_HAVE_LIBNUMA)
 add_executable(NUMAPlacementScheme_unittest
                "${CMAKE_CURRENT_SOURCE_DIR}/tests/NUMAPlacementScheme_unittest.cpp")
 target_link_libraries(NUMAPlacementScheme_unittest
+                      ${LIBS}
                       gtest
                       gtest_main
                       quickstep_catalog_NUMAPlacementScheme
                       quickstep_catalog_PartitionSchemeHeader
-                      quickstep_storage_StorageBlockInfo
-                      ${LIBS})
+                      quickstep_storage_StorageBlockInfo)
 add_test(NUMAPlacementScheme_unittest NUMAPlacementScheme_unittest)
 endif()
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/cli/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
index 03c5408..fef1de3 100644
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -17,11 +17,6 @@
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-if (ENABLE_DISTRIBUTED)
-  add_subdirectory(distributed)
-endif(ENABLE_DISTRIBUTED)
-add_subdirectory(tests)
-
 if (WIN32)
   set(QUICKSTEP_OS_WINDOWS TRUE)
 endif()
@@ -65,6 +60,13 @@ if (ENABLE_NETWORK_CLI)
                     NetworkCli.proto)
 endif()
 
+# Include subdirectories
+add_subdirectory(tests)
+
+if (ENABLE_DISTRIBUTED)
+  add_subdirectory(distributed)
+endif(ENABLE_DISTRIBUTED)
+
 # Declare micro-libs and link dependencies:
 add_library(quickstep_cli_CommandExecutor CommandExecutor.cpp CommandExecutor.hpp)
 add_library(quickstep_cli_CommandExecutorUtil CommandExecutorUtil.cpp CommandExecutorUtil.hpp)
@@ -74,6 +76,9 @@ add_library(quickstep_cli_DropRelation DropRelation.cpp DropRelation.hpp)
 add_library(quickstep_cli_Flags Flags.cpp Flags.hpp)
 add_library(quickstep_cli_IOInterface ../empty_src.cpp IOInterface.hpp)
 add_library(quickstep_cli_InputParserUtil InputParserUtil.cpp InputParserUtil.hpp)
+add_library(quickstep_cli_LineReaderBuffered LineReaderBuffered.cpp LineReaderBuffered.hpp)
+add_library(quickstep_cli_LocalIO ../empty_src.cpp LocalIO.hpp)
+add_library(quickstep_cli_PrintToScreen PrintToScreen.cpp PrintToScreen.hpp)
 
 if(USE_LINENOISE)
   add_library(quickstep_cli_LineReader
@@ -89,13 +94,6 @@ else()
               LineReaderDumb.hpp)
 endif()
 
-add_library(quickstep_cli_LineReaderBuffered
-            LineReaderBuffered.cpp
-            LineReaderBuffered.hpp)
-add_library(quickstep_cli_LocalIO
-            ../empty_src.cpp
-            LocalIO.hpp)
-
 if (ENABLE_NETWORK_CLI)
   add_library(quickstep_cli_NetworkCli_proto
               ${cli_NetworkCli_proto_srcs}
@@ -108,8 +106,6 @@ if (ENABLE_NETWORK_CLI)
               NetworkIO.hpp)
 endif()
 
-add_library(quickstep_cli_PrintToScreen PrintToScreen.cpp PrintToScreen.hpp)
-
 # Link dependencies:
 target_link_libraries(quickstep_cli_CommandExecutor
                       glog
@@ -160,13 +156,9 @@ target_link_libraries(quickstep_cli_CommandExecutorUtil
 target_link_libraries(quickstep_cli_DefaultsConfigurator
                       glog
                       quickstep_catalog_Catalog
-                      quickstep_catalog_Catalog_proto
                       quickstep_catalog_CatalogDatabase
+                      quickstep_catalog_Catalog_proto
                       quickstep_utility_Macros)
-if(QUICKSTEP_HAVE_LIBNUMA)
-  target_link_libraries(quickstep_cli_DefaultsConfigurator
-                        ${LIBNUMA_LIBRARY})
-endif()
 target_link_libraries(quickstep_cli_DropRelation
                       quickstep_catalog_CatalogDatabase
                       quickstep_catalog_CatalogRelation
@@ -174,19 +166,43 @@ target_link_libraries(quickstep_cli_DropRelation
                       quickstep_storage_StorageManager
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_cli_Flags
+                      ${GFLAGS_LIB_NAME}
                       quickstep_cli_DefaultsConfigurator
-                      quickstep_storage_StorageConstants
-                      ${GFLAGS_LIB_NAME})
+                      quickstep_storage_StorageConstants)
 target_link_libraries(quickstep_cli_IOInterface
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_cli_InputParserUtil
                       glog
                       quickstep_utility_Macros
                       quickstep_utility_StringUtil)
+target_link_libraries(quickstep_cli_LineReaderBuffered
+                      quickstep_cli_LineReader
+                      quickstep_utility_Macros)
+target_link_libraries(quickstep_cli_LocalIO
+                      quickstep_cli_IOInterface
+                      quickstep_cli_LineReader
+                      quickstep_utility_Macros)
+target_link_libraries(quickstep_cli_PrintToScreen
+                      ${GFLAGS_LIB_NAME}
+                      quickstep_catalog_CatalogAttribute
+                      quickstep_catalog_CatalogRelation
+                      quickstep_storage_StorageBlock
+                      quickstep_storage_StorageBlockInfo
+                      quickstep_storage_StorageManager
+                      quickstep_storage_TupleIdSequence
+                      quickstep_storage_TupleStorageSubBlock
+                      quickstep_types_IntType
+                      quickstep_types_Type
+                      quickstep_types_TypedValue
+                      quickstep_utility_Macros)
+
 if(QUICKSTEP_HAVE_LIBNUMA)
+  target_link_libraries(quickstep_cli_DefaultsConfigurator
+                        ${LIBNUMA_LIBRARY})
   target_link_libraries(quickstep_cli_InputParserUtil
                         ${LIBNUMA_LIBRARY})
 endif()
+
 if(USE_LINENOISE)
   target_link_libraries(quickstep_cli_LineReader
                         glog
@@ -197,13 +213,7 @@ else()
                         glog
                         quickstep_utility_Macros)
 endif()
-target_link_libraries(quickstep_cli_LineReaderBuffered
-                      quickstep_cli_LineReader
-                      quickstep_utility_Macros)
-target_link_libraries(quickstep_cli_LocalIO
-                      quickstep_cli_LineReader
-                      quickstep_cli_IOInterface
-                      quickstep_utility_Macros)
+
 if (ENABLE_NETWORK_CLI)
   target_link_libraries(quickstep_cli_NetworkCli_proto
                         ${GRPCPLUSPLUS_LIBRARIES}
@@ -228,19 +238,6 @@ if (ENABLE_NETWORK_CLI)
                         quickstep_utility_MemStream
                         quickstep_utility_ThreadSafeQueue)
 endif()
-target_link_libraries(quickstep_cli_PrintToScreen
-                      ${GFLAGS_LIB_NAME}
-                      quickstep_catalog_CatalogAttribute
-                      quickstep_catalog_CatalogRelation
-                      quickstep_storage_StorageBlock
-                      quickstep_storage_StorageBlockInfo
-                      quickstep_storage_StorageManager
-                      quickstep_storage_TupleIdSequence
-                      quickstep_storage_TupleStorageSubBlock
-                      quickstep_types_IntType
-                      quickstep_types_Type
-                      quickstep_types_TypedValue
-                      quickstep_utility_Macros)
 
 # Module all-in-one library:
 add_library(quickstep_cli ../empty_src.cpp CliModule.hpp)
@@ -258,9 +255,15 @@ target_link_libraries(quickstep_cli
                       quickstep_cli_LineReaderBuffered
                       quickstep_cli_LocalIO
                       quickstep_cli_PrintToScreen)
+
 if (ENABLE_NETWORK_CLI)
   target_link_libraries(quickstep_cli
-                        quickstep_cli_NetworkCli_proto
                         quickstep_cli_NetworkCliClient
+                        quickstep_cli_NetworkCli_proto
                         quickstep_cli_NetworkIO)
 endif()
+
+if (ENABLE_DISTRIBUTED)
+  target_link_libraries(quickstep_cli
+                        quickstep_cli_distributed)
+endif(ENABLE_DISTRIBUTED)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/cli/distributed/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cli/distributed/CMakeLists.txt b/cli/distributed/CMakeLists.txt
index 93d3b5e..c2c578a 100644
--- a/cli/distributed/CMakeLists.txt
+++ b/cli/distributed/CMakeLists.txt
@@ -69,9 +69,9 @@ target_link_libraries(quickstep_cli_distributed_Executor
                       quickstep_utility_Macros
                       tmb)
 target_link_libraries(quickstep_cli_distributed_Role
+                      ${GFLAGS_LIB_NAME}
                       quickstep_utility_Macros
-                      tmb
-                      ${GFLAGS_LIB_NAME})
+                      tmb)
 
 # Module all-in-one library:
 add_library(quickstep_cli_distributed ../../empty_src.cpp CliDistributedModule.hpp)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/cli/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cli/tests/CMakeLists.txt b/cli/tests/CMakeLists.txt
index a59491e..c450e4d 100644
--- a/cli/tests/CMakeLists.txt
+++ b/cli/tests/CMakeLists.txt
@@ -45,6 +45,7 @@ if (ENABLE_NETWORK_CLI)
 endif()
 
 target_link_libraries(quickstep_cli_tests_CommandExecutorTest
+                      ${LIBS}
                       glog
                       gtest
                       quickstep_catalog_CatalogDatabase
@@ -67,10 +68,11 @@ target_link_libraries(quickstep_cli_tests_CommandExecutorTest
                       quickstep_utility_MemStream
                       quickstep_utility_SqlError
                       quickstep_utility_TextBasedTestDriver
-                      tmb
-                      ${LIBS})
+                      tmb)
 if (ENABLE_DISTRIBUTED)
   target_link_libraries(quickstep_cli_tests_DistributedCommandExecutorTest
+                        ${GFLAGS_LIB_NAME}
+                        ${LIBS}
                         glog
                         gtest
                         quickstep_catalog_CatalogTypedefs
@@ -98,9 +100,7 @@ if (ENABLE_DISTRIBUTED)
                         quickstep_utility_MemStream
                         quickstep_utility_SqlError
                         quickstep_utility_TextBasedTestDriver
-                        tmb
-                        ${GFLAGS_LIB_NAME}
-                        ${LIBS})
+                        tmb)
 endif(ENABLE_DISTRIBUTED)
 
 target_link_libraries(LineReaderBuffered_unittest

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/compression/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/compression/CMakeLists.txt b/compression/CMakeLists.txt
index ede899c..6d9263c 100644
--- a/compression/CMakeLists.txt
+++ b/compression/CMakeLists.txt
@@ -58,6 +58,7 @@ target_link_libraries(quickstep_compression
 # Tests:
 add_executable(CompressionDictionary_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/CompressionDictionary_unittest.cpp")
 target_link_libraries(CompressionDictionary_unittest
+                      ${LIBS}
                       gtest
                       gtest_main
                       quickstep_compression_CompressionDictionary
@@ -73,6 +74,5 @@ target_link_libraries(CompressionDictionary_unittest
                       quickstep_types_operations_comparisons_Comparison
                       quickstep_types_operations_comparisons_ComparisonFactory
                       quickstep_types_operations_comparisons_ComparisonID
-                      quickstep_utility_ScopedBuffer
-                      ${LIBS})
+                      quickstep_utility_ScopedBuffer)
 add_test(CompressionDictionary_unittest CompressionDictionary_unittest)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/expressions/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/expressions/CMakeLists.txt b/expressions/CMakeLists.txt
index 33606cd..5e43e4f 100644
--- a/expressions/CMakeLists.txt
+++ b/expressions/CMakeLists.txt
@@ -61,10 +61,10 @@ target_link_libraries(quickstep_expressions_ExpressionFactories
                       quickstep_types_operations_unaryoperations_UnaryOperationFactory
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_Expressions_proto
+                      ${PROTOBUF_LIBRARY}
                       quickstep_types_Type_proto
                       quickstep_types_TypedValue_proto
-                      quickstep_types_operations_Operation_proto
-                      ${PROTOBUF_LIBRARY})
+                      quickstep_types_operations_Operation_proto)
 
 # Module all-in-one library:
 add_library(quickstep_expressions ../empty_src.cpp ExpressionsModule.hpp)
@@ -74,4 +74,5 @@ target_link_libraries(quickstep_expressions
                       quickstep_expressions_Expressions_proto
                       quickstep_expressions_aggregation
                       quickstep_expressions_predicate
-                      quickstep_expressions_scalar)
+                      quickstep_expressions_scalar
+                      quickstep_expressions_windowaggregation)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/expressions/aggregation/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/expressions/aggregation/CMakeLists.txt b/expressions/aggregation/CMakeLists.txt
index 4220a8d..de3930e 100644
--- a/expressions/aggregation/CMakeLists.txt
+++ b/expressions/aggregation/CMakeLists.txt
@@ -23,8 +23,6 @@ QS_PROTOBUF_GENERATE_CPP(expressions_aggregation_AggregateFunction_proto_srcs
 add_library(quickstep_expressions_aggregation_AggregateFunction
             AggregateFunction.cpp
             AggregateFunction.hpp)
-add_library(quickstep_expressions_aggregation_AggregateFunction_proto
-            ${expressions_aggregation_AggregateFunction_proto_srcs})
 add_library(quickstep_expressions_aggregation_AggregateFunctionAvg
             AggregateFunctionAvg.cpp
             AggregateFunctionAvg.hpp)
@@ -43,6 +41,8 @@ add_library(quickstep_expressions_aggregation_AggregateFunctionMin
 add_library(quickstep_expressions_aggregation_AggregateFunctionSum
             AggregateFunctionSum.cpp
             AggregateFunctionSum.hpp)
+add_library(quickstep_expressions_aggregation_AggregateFunction_proto
+            ${expressions_aggregation_AggregateFunction_proto_srcs})
 add_library(quickstep_expressions_aggregation_AggregationConcreteHandle
             AggregationConcreteHandle.cpp
             AggregationConcreteHandle.hpp)
@@ -74,8 +74,6 @@ target_link_libraries(quickstep_expressions_aggregation_AggregateFunction
                       quickstep_expressions_aggregation_AggregateFunction_proto
                       quickstep_expressions_aggregation_AggregationID
                       quickstep_utility_Macros)
-target_link_libraries(quickstep_expressions_aggregation_AggregateFunction_proto
-                      ${PROTOBUF_LIBRARY})
 target_link_libraries(quickstep_expressions_aggregation_AggregateFunctionAvg
                       glog
                       quickstep_expressions_aggregation_AggregateFunction
@@ -99,12 +97,12 @@ target_link_libraries(quickstep_expressions_aggregation_AggregateFunctionCount
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_aggregation_AggregateFunctionFactory
                       glog
-                      quickstep_expressions_aggregation_AggregateFunction_proto
                       quickstep_expressions_aggregation_AggregateFunctionAvg
                       quickstep_expressions_aggregation_AggregateFunctionCount
                       quickstep_expressions_aggregation_AggregateFunctionMax
                       quickstep_expressions_aggregation_AggregateFunctionMin
                       quickstep_expressions_aggregation_AggregateFunctionSum
+                      quickstep_expressions_aggregation_AggregateFunction_proto
                       quickstep_expressions_aggregation_AggregationID
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_aggregation_AggregateFunctionMax
@@ -139,6 +137,8 @@ target_link_libraries(quickstep_expressions_aggregation_AggregateFunctionSum
                       quickstep_types_operations_binaryoperations_BinaryOperationFactory
                       quickstep_types_operations_binaryoperations_BinaryOperationID
                       quickstep_utility_Macros)
+target_link_libraries(quickstep_expressions_aggregation_AggregateFunction_proto
+                      ${PROTOBUF_LIBRARY})
 target_link_libraries(quickstep_expressions_aggregation_AggregationConcreteHandle
                       glog
                       quickstep_expressions_aggregation_AggregationHandle
@@ -237,13 +237,13 @@ target_link_libraries(quickstep_expressions_aggregation_AggregationHandleSum
 add_library(quickstep_expressions_aggregation ../../empty_src.cpp)
 target_link_libraries(quickstep_expressions_aggregation
                       quickstep_expressions_aggregation_AggregateFunction
-                      quickstep_expressions_aggregation_AggregateFunction_proto
                       quickstep_expressions_aggregation_AggregateFunctionAvg
                       quickstep_expressions_aggregation_AggregateFunctionCount
                       quickstep_expressions_aggregation_AggregateFunctionFactory
                       quickstep_expressions_aggregation_AggregateFunctionMax
                       quickstep_expressions_aggregation_AggregateFunctionMin
                       quickstep_expressions_aggregation_AggregateFunctionSum
+                      quickstep_expressions_aggregation_AggregateFunction_proto
                       quickstep_expressions_aggregation_AggregationConcreteHandle
                       quickstep_expressions_aggregation_AggregationHandle
                       quickstep_expressions_aggregation_AggregationHandleAvg

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/expressions/predicate/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/expressions/predicate/CMakeLists.txt b/expressions/predicate/CMakeLists.txt
index 04abfc7..90cda0b 100644
--- a/expressions/predicate/CMakeLists.txt
+++ b/expressions/predicate/CMakeLists.txt
@@ -43,6 +43,7 @@ add_library(quickstep_expressions_predicate_TrivialPredicates
 
 # Link dependencies:
 target_link_libraries(quickstep_expressions_predicate_ComparisonPredicate
+                      glog
                       quickstep_catalog_CatalogAttribute
                       quickstep_catalog_CatalogTypedefs
                       quickstep_expressions_Expressions_proto

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/expressions/scalar/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/expressions/scalar/CMakeLists.txt b/expressions/scalar/CMakeLists.txt
index 6b52231..6a03ffa 100644
--- a/expressions/scalar/CMakeLists.txt
+++ b/expressions/scalar/CMakeLists.txt
@@ -46,6 +46,7 @@ target_link_libraries(quickstep_expressions_scalar_Scalar
                       quickstep_types_containers_ColumnVector
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_scalar_ScalarAttribute
+                      glog
                       quickstep_catalog_CatalogAttribute
                       quickstep_catalog_CatalogRelationSchema
                       quickstep_catalog_CatalogTypedefs
@@ -59,6 +60,7 @@ target_link_libraries(quickstep_expressions_scalar_ScalarAttribute
                       quickstep_types_containers_ColumnVector
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_scalar_ScalarBinaryExpression
+                      glog
                       quickstep_catalog_CatalogTypedefs
                       quickstep_expressions_Expressions_proto
                       quickstep_expressions_scalar_Scalar
@@ -73,6 +75,7 @@ target_link_libraries(quickstep_expressions_scalar_ScalarBinaryExpression
                       quickstep_types_operations_binaryoperations_BinaryOperationID
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_scalar_ScalarCaseExpression
+                      glog
                       quickstep_catalog_CatalogTypedefs
                       quickstep_expressions_Expressions_proto
                       quickstep_expressions_predicate_Predicate
@@ -109,6 +112,7 @@ target_link_libraries(quickstep_expressions_scalar_ScalarSharedExpression
                       quickstep_utility_ColumnVectorCache
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_scalar_ScalarUnaryExpression
+                      glog
                       quickstep_catalog_CatalogTypedefs
                       quickstep_expressions_Expressions_proto
                       quickstep_expressions_scalar_Scalar

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/expressions/table_generator/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/expressions/table_generator/CMakeLists.txt b/expressions/table_generator/CMakeLists.txt
index 037944e..756b425 100644
--- a/expressions/table_generator/CMakeLists.txt
+++ b/expressions/table_generator/CMakeLists.txt
@@ -20,32 +20,37 @@ QS_PROTOBUF_GENERATE_CPP(expressions_tablegenerator_GeneratorFunction_proto_srcs
                          GeneratorFunction.proto)
 
 # Declare micro-libs:
-add_library(quickstep_expressions_tablegenerator_GenerateSeries
-            ../../empty_src.cpp
-            GeneratorFunction.hpp)
-add_library(quickstep_expressions_tablegenerator_GenerateSeriesHandle
-            ../../empty_src.cpp
-            GeneratorFunctionHandle.hpp)
-add_library(quickstep_expressions_tablegenerator_GeneratorFunction
-            ../../empty_src.cpp
-            GeneratorFunction.hpp)
-add_library(quickstep_expressions_tablegenerator_GeneratorFunction_proto
-            ${expressions_tablegenerator_GeneratorFunction_proto_srcs})
+add_library(quickstep_expressions_tablegenerator_GenerateSeries ../../empty_src.cpp GenerateSeries.hpp)
+add_library(quickstep_expressions_tablegenerator_GenerateSeriesHandle ../../empty_src.cpp GenerateSeriesHandle.hpp)
+add_library(quickstep_expressions_tablegenerator_GeneratorFunction ../../empty_src.cpp GeneratorFunction.hpp)
 add_library(quickstep_expressions_tablegenerator_GeneratorFunctionFactory
             GeneratorFunctionFactory.cpp
             GeneratorFunctionFactory.hpp)
 add_library(quickstep_expressions_tablegenerator_GeneratorFunctionHandle
             ../../empty_src.cpp
             GeneratorFunctionHandle.hpp)
+add_library(quickstep_expressions_tablegenerator_GeneratorFunction_proto
+            ${expressions_tablegenerator_GeneratorFunction_proto_srcs})
 
 # Link dependencies:
 target_link_libraries(quickstep_expressions_tablegenerator_GenerateSeries
+                      glog
+                      quickstep_expressions_tablegenerator_GenerateSeriesHandle
+                      quickstep_expressions_tablegenerator_GeneratorFunction
+                      quickstep_types_Type
+                      quickstep_types_TypeFactory
+                      quickstep_types_TypeID
+                      quickstep_types_TypedValue
+                      quickstep_types_operations_comparisons_GreaterComparison
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_tablegenerator_GenerateSeriesHandle
                       glog
-                      quickstep_expressions_tablegenerator_GeneratorFunction_proto
+                      quickstep_expressions_tablegenerator_GeneratorFunctionHandle
+                      quickstep_types_Type
+                      quickstep_types_TypeID
                       quickstep_types_TypedValue
-                      quickstep_types_TypedValue_proto
+                      quickstep_types_containers_ColumnVector
+                      quickstep_types_containers_ColumnVectorsValueAccessor
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_tablegenerator_GeneratorFunction
                       quickstep_utility_Macros)
@@ -62,5 +67,5 @@ target_link_libraries(quickstep_expressions_tablegenerator_GeneratorFunctionHand
                       quickstep_types_TypedValue_proto
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_expressions_tablegenerator_GeneratorFunction_proto
-                      quickstep_types_TypedValue_proto
-                      ${PROTOBUF_LIBRARY})
+                      ${PROTOBUF_LIBRARY}
+                      quickstep_types_TypedValue_proto)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/expressions/window_aggregation/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/expressions/window_aggregation/CMakeLists.txt b/expressions/window_aggregation/CMakeLists.txt
index b33a401..2fe1396 100644
--- a/expressions/window_aggregation/CMakeLists.txt
+++ b/expressions/window_aggregation/CMakeLists.txt
@@ -23,8 +23,6 @@ QS_PROTOBUF_GENERATE_CPP(expressions_windowaggregation_WindowAggregateFunction_p
 add_library(quickstep_expressions_windowaggregation_WindowAggregateFunction
             WindowAggregateFunction.cpp
             WindowAggregateFunction.hpp)
-add_library(quickstep_expressions_windowaggregation_WindowAggregateFunction_proto
-            ${expressions_windowaggregation_WindowAggregateFunction_proto_srcs})
 add_library(quickstep_expressions_windowaggregation_WindowAggregateFunctionAvg
             WindowAggregateFunctionAvg.cpp
             WindowAggregateFunctionAvg.hpp)
@@ -43,6 +41,8 @@ add_library(quickstep_expressions_windowaggregation_WindowAggregateFunctionMin
 add_library(quickstep_expressions_windowaggregation_WindowAggregateFunctionSum
             WindowAggregateFunctionSum.cpp
             WindowAggregateFunctionSum.hpp)
+add_library(quickstep_expressions_windowaggregation_WindowAggregateFunction_proto
+            ${expressions_windowaggregation_WindowAggregateFunction_proto_srcs})
 add_library(quickstep_expressions_windowaggregation_WindowAggregationHandle
             WindowAggregationHandle.cpp
             WindowAggregationHandle.hpp)
@@ -61,8 +61,6 @@ target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregateFun
                       quickstep_expressions_windowaggregation_WindowAggregationID
                       quickstep_storage_StorageBlockInfo
                       quickstep_utility_Macros)
-target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregateFunction_proto
-                      ${PROTOBUF_LIBRARY})
 target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregateFunctionAvg
                       glog
                       quickstep_expressions_windowaggregation_WindowAggregateFunction
@@ -126,6 +124,8 @@ target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregateFun
                       quickstep_types_operations_binaryoperations_BinaryOperationFactory
                       quickstep_types_operations_binaryoperations_BinaryOperationID
                       quickstep_utility_Macros)
+target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregateFunction_proto
+                      ${PROTOBUF_LIBRARY})
 target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregationHandle
                       glog
                       quickstep_catalog_CatalogRelationSchema
@@ -165,13 +165,13 @@ target_link_libraries(quickstep_expressions_windowaggregation_WindowAggregationH
 add_library(quickstep_expressions_windowaggregation ../../empty_src.cpp)
 target_link_libraries(quickstep_expressions_windowaggregation
                       quickstep_expressions_windowaggregation_WindowAggregateFunction
-                      quickstep_expressions_windowaggregation_WindowAggregateFunction_proto
                       quickstep_expressions_windowaggregation_WindowAggregateFunctionAvg
                       quickstep_expressions_windowaggregation_WindowAggregateFunctionCount
                       quickstep_expressions_windowaggregation_WindowAggregateFunctionFactory
                       quickstep_expressions_windowaggregation_WindowAggregateFunctionMax
                       quickstep_expressions_windowaggregation_WindowAggregateFunctionMin
                       quickstep_expressions_windowaggregation_WindowAggregateFunctionSum
+                      quickstep_expressions_windowaggregation_WindowAggregateFunction_proto
                       quickstep_expressions_windowaggregation_WindowAggregationHandle
                       quickstep_expressions_windowaggregation_WindowAggregationHandleAvg
                       quickstep_expressions_windowaggregation_WindowAggregationID)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/parser/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt
index d4aaab4..c8a86a5 100644
--- a/parser/CMakeLists.txt
+++ b/parser/CMakeLists.txt
@@ -51,7 +51,6 @@ else()
   message(WARNING "Unable to find flex. A preprocessed copy of the lexer sources will be used.")
 endif()
 
-
 if (RUN_BISON)
   BISON_TARGET(SqlParser SqlParser.ypp ${CMAKE_CURRENT_BINARY_DIR}/SqlParser_gen.cpp)
 else()
@@ -90,7 +89,9 @@ add_library(quickstep_parser_ParseBasicExpressions ParseBasicExpressions.cpp Par
 add_library(quickstep_parser_ParseBlockProperties ParseBlockProperties.cpp ParseBlockProperties.hpp)
 add_library(quickstep_parser_ParseCaseExpressions ParseCaseExpressions.cpp ParseCaseExpressions.hpp)
 add_library(quickstep_parser_ParseExpression ../empty_src.cpp ParseExpression.hpp)
-add_library(quickstep_parser_ParseGeneratorTableReference ParseGeneratorTableReference.cpp ParseGeneratorTableReference.hpp)
+add_library(quickstep_parser_ParseGeneratorTableReference
+            ParseGeneratorTableReference.cpp
+            ParseGeneratorTableReference.hpp)
 add_library(quickstep_parser_ParseGroupBy ParseGroupBy.cpp ParseGroupBy.hpp)
 add_library(quickstep_parser_ParseHaving ParseHaving.cpp ParseHaving.hpp)
 add_library(quickstep_parser_ParseIndexProperties ParseIndexProperties.cpp ParseIndexProperties.hpp)
@@ -112,14 +113,16 @@ add_library(quickstep_parser_ParseSimpleTableReference ParseSimpleTableReference
 add_library(quickstep_parser_ParseStatement ../empty_src.cpp ParseStatement.hpp)
 add_library(quickstep_parser_ParseString ParseString.cpp ParseString.hpp)
 add_library(quickstep_parser_ParseSubqueryExpression ParseSubqueryExpression.cpp ParseSubqueryExpression.hpp)
-add_library(quickstep_parser_ParseSubqueryTableReference ParseSubqueryTableReference.cpp ParseSubqueryTableReference.hpp)
+add_library(quickstep_parser_ParseSubqueryTableReference
+            ParseSubqueryTableReference.cpp
+            ParseSubqueryTableReference.hpp)
 add_library(quickstep_parser_ParseTableReference ParseTableReference.cpp ParseTableReference.hpp)
 add_library(quickstep_parser_ParseTreeNode ../empty_src.cpp ParseTreeNode.hpp)
 add_library(quickstep_parser_ParseWindow ../empty_src.cpp ParseWindow.hpp)
 add_library(quickstep_parser_ParserUtil ParserUtil.cpp ParserUtil.hpp)
-add_library(quickstep_parser_SqlParserWrapper SqlParserWrapper.cpp SqlParserWrapper.hpp)
-add_library(quickstep_parser_SqlParser ${BISON_SqlParser_OUTPUTS})
 add_library(quickstep_parser_SqlLexer ${FLEX_SqlLexer_OUTPUTS})
+add_library(quickstep_parser_SqlParser ${BISON_SqlParser_OUTPUTS})
+add_library(quickstep_parser_SqlParserWrapper SqlParserWrapper.cpp SqlParserWrapper.hpp)
 
 # Link dependencies:
 target_link_libraries(quickstep_parser_ParseAssignment
@@ -184,9 +187,16 @@ target_link_libraries(quickstep_parser_ParseIndexProperties
                       quickstep_utility_PtrList
                       quickstep_utility_StringUtil)
 target_link_libraries(quickstep_parser_ParseJoinedTableReference
+                      glog
                       quickstep_parser_ParsePredicate
                       quickstep_parser_ParseTableReference
                       quickstep_utility_Macros)
+target_link_libraries(quickstep_parser_ParseKeyValue
+                      quickstep_parser_ParseLiteralValue
+                      quickstep_parser_ParseString
+                      quickstep_parser_ParseTreeNode
+                      quickstep_utility_Macros
+                      quickstep_utility_PtrList)
 target_link_libraries(quickstep_parser_ParseLimit
                       quickstep_parser_ParseLiteralValue
                       quickstep_parser_ParseTreeNode
@@ -260,6 +270,7 @@ target_link_libraries(quickstep_parser_ParseSelectionClause
                       quickstep_utility_Macros
                       quickstep_utility_PtrList)
 target_link_libraries(quickstep_parser_ParseSetOperation
+                      glog
                       quickstep_parser_ParseTreeNode
                       quickstep_utility_Macros
                       quickstep_utility_PtrList)
@@ -291,12 +302,6 @@ target_link_libraries(quickstep_parser_ParseStatement
 target_link_libraries(quickstep_parser_ParseString
                       quickstep_parser_ParseTreeNode
                       quickstep_utility_Macros)
-target_link_libraries(quickstep_parser_ParseKeyValue
-                      quickstep_parser_ParseLiteralValue
-                      quickstep_parser_ParseString
-                      quickstep_parser_ParseTreeNode
-                      quickstep_utility_Macros
-                      quickstep_utility_PtrList)
 target_link_libraries(quickstep_parser_ParseSubqueryExpression
                       glog
                       quickstep_parser_ParseExpression
@@ -314,19 +319,19 @@ target_link_libraries(quickstep_parser_ParseTableReference
 target_link_libraries(quickstep_parser_ParseTreeNode
                       quickstep_utility_Macros
                       quickstep_utility_TreeStringSerializable)
-target_link_libraries(quickstep_parser_ParserUtil
-                      quickstep_utility_SqlError)
 target_link_libraries(quickstep_parser_ParseWindow
                       quickstep_parser_ParseExpression
                       quickstep_parser_ParseOrderBy
                       quickstep_parser_ParseString
                       quickstep_parser_ParseTreeNode
                       quickstep_utility_PtrList)
+target_link_libraries(quickstep_parser_ParserUtil
+                      quickstep_utility_SqlError)
 target_link_libraries(quickstep_parser_SqlLexer
                       quickstep_parser_ParseJoinedTableReference
                       quickstep_parser_ParseLiteralValue
-                      quickstep_parser_ParserUtil
                       quickstep_parser_ParseString
+                      quickstep_parser_ParserUtil
                       quickstep_parser_SqlParser
                       quickstep_utility_PtrList
                       quickstep_utility_PtrVector)
@@ -422,6 +427,7 @@ target_link_libraries(quickstep_parser
                       quickstep_parser_ParseHaving
                       quickstep_parser_ParseIndexProperties
                       quickstep_parser_ParseJoinedTableReference
+                      quickstep_parser_ParseKeyValue
                       quickstep_parser_ParseLimit
                       quickstep_parser_ParseLiteralValue
                       quickstep_parser_ParseOrderBy
@@ -430,7 +436,6 @@ target_link_libraries(quickstep_parser
                       quickstep_parser_ParsePredicateExists
                       quickstep_parser_ParsePredicateInTableQuery
                       quickstep_parser_ParsePriority
-                      quickstep_parser_ParserUtil
                       quickstep_parser_ParseSample
                       quickstep_parser_ParseSelect
                       quickstep_parser_ParseSelectionClause
@@ -438,12 +443,12 @@ target_link_libraries(quickstep_parser
                       quickstep_parser_ParseSimpleTableReference
                       quickstep_parser_ParseStatement
                       quickstep_parser_ParseString
-                      quickstep_parser_ParseKeyValue
                       quickstep_parser_ParseSubqueryExpression
                       quickstep_parser_ParseSubqueryTableReference
                       quickstep_parser_ParseTableReference
                       quickstep_parser_ParseTreeNode
                       quickstep_parser_ParseWindow
+                      quickstep_parser_ParserUtil
                       quickstep_parser_SqlLexer
                       quickstep_parser_SqlParser
                       quickstep_parser_SqlParserWrapper)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/parser/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/parser/tests/CMakeLists.txt b/parser/tests/CMakeLists.txt
index 63bcd1c..ae817b0 100644
--- a/parser/tests/CMakeLists.txt
+++ b/parser/tests/CMakeLists.txt
@@ -16,15 +16,16 @@
 # under the License.
 
 add_executable(quickstep_parser_tests_ParserTest
-              "${CMAKE_CURRENT_SOURCE_DIR}/ParserTest.cpp"
-              "${PROJECT_SOURCE_DIR}/utility/textbased_test/TextBasedTest.cpp"
-              "${PROJECT_SOURCE_DIR}/utility/textbased_test/TextBasedTest.hpp")
+               "${CMAKE_CURRENT_SOURCE_DIR}/ParserTest.cpp"
+               "${PROJECT_SOURCE_DIR}/utility/textbased_test/TextBasedTest.cpp"
+               "${PROJECT_SOURCE_DIR}/utility/textbased_test/TextBasedTest.hpp")
 
 target_link_libraries(quickstep_parser_tests_ParserTest
                       glog
                       gtest
                       gtest_main
-                      quickstep_parser
+                      quickstep_parser_ParseStatement
+                      quickstep_parser_SqlParserWrapper
                       quickstep_utility_Macros
                       quickstep_utility_TextBasedTestDriver)
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/query_execution/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/query_execution/CMakeLists.txt b/query_execution/CMakeLists.txt
index 791434a..6e817ae 100644
--- a/query_execution/CMakeLists.txt
+++ b/query_execution/CMakeLists.txt
@@ -25,20 +25,10 @@ set_gflags_lib_name ()
 
 # Declare micro-libs:
 add_library(quickstep_queryexecution_AdmitRequestMessage ../empty_src.cpp AdmitRequestMessage.hpp)
-if (ENABLE_DISTRIBUTED)
-  add_library(quickstep_queryexecution_BlockLocator BlockLocator.cpp BlockLocator.hpp)
-  add_library(quickstep_queryexecution_BlockLocatorUtil BlockLocatorUtil.cpp BlockLocatorUtil.hpp)
-endif(ENABLE_DISTRIBUTED)
 add_library(quickstep_queryexecution_ExecutionStats ../empty_src.cpp ExecutionStats.hpp)
 add_library(quickstep_queryexecution_ForemanBase ../empty_src.cpp ForemanBase.hpp)
-if (ENABLE_DISTRIBUTED)
-  add_library(quickstep_queryexecution_ForemanDistributed ForemanDistributed.cpp ForemanDistributed.hpp)
-endif(ENABLE_DISTRIBUTED)
 add_library(quickstep_queryexecution_ForemanSingleNode ForemanSingleNode.cpp ForemanSingleNode.hpp)
 add_library(quickstep_queryexecution_PolicyEnforcerBase PolicyEnforcerBase.cpp PolicyEnforcerBase.hpp)
-if (ENABLE_DISTRIBUTED)
-  add_library(quickstep_queryexecution_PolicyEnforcerDistributed PolicyEnforcerDistributed.cpp PolicyEnforcerDistributed.hpp)
-endif(ENABLE_DISTRIBUTED)
 add_library(quickstep_queryexecution_PolicyEnforcerSingleNode PolicyEnforcerSingleNode.cpp PolicyEnforcerSingleNode.hpp)
 add_library(quickstep_queryexecution_ProbabilityStore ../empty_src.cpp ProbabilityStore.hpp)
 add_library(quickstep_queryexecution_QueryContext QueryContext.cpp QueryContext.hpp)
@@ -52,83 +42,41 @@ add_library(quickstep_queryexecution_QueryExecutionState ../empty_src.cpp QueryE
 add_library(quickstep_queryexecution_QueryExecutionTypedefs ../empty_src.cpp QueryExecutionTypedefs.hpp)
 add_library(quickstep_queryexecution_QueryExecutionUtil ../empty_src.cpp QueryExecutionUtil.hpp)
 add_library(quickstep_queryexecution_QueryManagerBase QueryManagerBase.cpp QueryManagerBase.hpp)
-if (ENABLE_DISTRIBUTED)
-  add_library(quickstep_queryexecution_QueryManagerDistributed QueryManagerDistributed.cpp QueryManagerDistributed.hpp)
-endif(ENABLE_DISTRIBUTED)
 add_library(quickstep_queryexecution_QueryManagerSingleNode QueryManagerSingleNode.cpp QueryManagerSingleNode.hpp)
-if (ENABLE_DISTRIBUTED)
-  add_library(quickstep_queryexecution_Shiftboss Shiftboss.cpp Shiftboss.hpp)
-  add_library(quickstep_queryexecution_ShiftbossDirectory ../empty_src.cpp ShiftbossDirectory.hpp)
-endif(ENABLE_DISTRIBUTED)
 add_library(quickstep_queryexecution_WorkOrderProtosContainer ../empty_src.cpp WorkOrderProtosContainer.hpp)
+add_library(quickstep_queryexecution_WorkOrderSelectionPolicy ../empty_src.cpp WorkOrderSelectionPolicy.hpp)
 add_library(quickstep_queryexecution_WorkOrdersContainer WorkOrdersContainer.cpp WorkOrdersContainer.hpp)
 add_library(quickstep_queryexecution_Worker Worker.cpp Worker.hpp)
 add_library(quickstep_queryexecution_WorkerDirectory ../empty_src.cpp WorkerDirectory.hpp)
 add_library(quickstep_queryexecution_WorkerMessage ../empty_src.cpp WorkerMessage.hpp)
-add_library(quickstep_queryexecution_WorkOrderSelectionPolicy ../empty_src.cpp WorkOrderSelectionPolicy.hpp)
 add_library(quickstep_queryexecution_WorkerSelectionPolicy ../empty_src.cpp WorkerSelectionPolicy.hpp)
 
+if (ENABLE_DISTRIBUTED)
+  add_library(quickstep_queryexecution_BlockLocator BlockLocator.cpp BlockLocator.hpp)
+  add_library(quickstep_queryexecution_BlockLocatorUtil BlockLocatorUtil.cpp BlockLocatorUtil.hpp)
+  add_library(quickstep_queryexecution_ForemanDistributed ForemanDistributed.cpp ForemanDistributed.hpp)
+  add_library(quickstep_queryexecution_PolicyEnforcerDistributed
+              PolicyEnforcerDistributed.cpp
+              PolicyEnforcerDistributed.hpp)
+  add_library(quickstep_queryexecution_QueryManagerDistributed QueryManagerDistributed.cpp QueryManagerDistributed.hpp)
+  add_library(quickstep_queryexecution_Shiftboss Shiftboss.cpp Shiftboss.hpp)
+  add_library(quickstep_queryexecution_ShiftbossDirectory ../empty_src.cpp ShiftbossDirectory.hpp)
+endif(ENABLE_DISTRIBUTED)
+
 # Link dependencies:
 target_link_libraries(quickstep_queryexecution_AdmitRequestMessage
                       quickstep_utility_Macros)
-if (ENABLE_DISTRIBUTED)
-  target_link_libraries(quickstep_queryexecution_BlockLocator
-                        glog
-                        quickstep_queryexecution_QueryExecutionMessages_proto
-                        quickstep_queryexecution_QueryExecutionTypedefs
-                        quickstep_queryexecution_QueryExecutionUtil
-                        quickstep_storage_StorageBlockInfo
-                        quickstep_storage_StorageConstants
-                        quickstep_threading_SpinSharedMutex
-                        quickstep_threading_Thread
-                        quickstep_threading_ThreadUtil
-                        quickstep_utility_Macros
-                        tmb)
-  target_link_libraries(quickstep_queryexecution_BlockLocatorUtil
-                        glog
-                        quickstep_queryexecution_QueryExecutionMessages_proto
-                        quickstep_queryexecution_QueryExecutionTypedefs
-                        quickstep_storage_StorageBlockInfo
-                        tmb)
-endif(ENABLE_DISTRIBUTED)
+target_link_libraries(quickstep_queryexecution_ExecutionStats
+                      glog
+                      quickstep_utility_Macros)
 target_link_libraries(quickstep_queryexecution_ForemanBase
                       glog
                       quickstep_queryexecution_PolicyEnforcerBase
                       quickstep_threading_Thread
                       quickstep_utility_Macros
                       tmb)
-if (ENABLE_DISTRIBUTED)
-  target_link_libraries(quickstep_queryexecution_ForemanDistributed
-                        glog
-                        quickstep_catalog_CatalogDatabase
-                        quickstep_catalog_CatalogRelation
-                        quickstep_catalog_CatalogTypedefs
-                        quickstep_catalog_Catalog_proto
-                        quickstep_cli_Flags
-                        quickstep_queryexecution_AdmitRequestMessage
-                        quickstep_queryexecution_BlockLocator
-                        quickstep_queryexecution_BlockLocatorUtil
-                        quickstep_queryexecution_ForemanBase
-                        quickstep_queryexecution_PolicyEnforcerBase
-                        quickstep_queryexecution_PolicyEnforcerDistributed
-                        quickstep_queryexecution_QueryContext
-                        quickstep_queryexecution_QueryExecutionMessages_proto
-                        quickstep_queryexecution_QueryExecutionTypedefs
-                        quickstep_queryexecution_QueryExecutionUtil
-                        quickstep_queryexecution_ShiftbossDirectory
-                        quickstep_relationaloperators_WorkOrder_proto
-                        quickstep_storage_DataExchangerAsync
-                        quickstep_storage_StorageBlockInfo
-                        quickstep_storage_StorageManager
-                        quickstep_threading_ThreadUtil
-                        quickstep_utility_Macros
-                        tmb
-                        ${GFLAGS_LIB_NAME})
-endif(ENABLE_DISTRIBUTED)
-target_link_libraries(quickstep_queryexecution_ExecutionStats
-                      glog
-                      quickstep_utility_Macros)
 target_link_libraries(quickstep_queryexecution_ForemanSingleNode
+                      ${GFLAGS_LIB_NAME}
                       glog
                       quickstep_queryexecution_AdmitRequestMessage
                       quickstep_queryexecution_ForemanBase
@@ -140,9 +88,9 @@ target_link_libraries(quickstep_queryexecution_ForemanSingleNode
                       quickstep_queryexecution_WorkerMessage
                       quickstep_threading_ThreadUtil
                       quickstep_utility_Macros
-                      tmb
-                      ${GFLAGS_LIB_NAME})
+                      tmb)
 target_link_libraries(quickstep_queryexecution_PolicyEnforcerBase
+                      ${GFLAGS_LIB_NAME}
                       glog
                       quickstep_catalog_CatalogDatabase
                       quickstep_catalog_CatalogRelation
@@ -153,42 +101,9 @@ target_link_libraries(quickstep_queryexecution_PolicyEnforcerBase
                       quickstep_queryexecution_QueryManagerBase
                       quickstep_relationaloperators_WorkOrder
                       quickstep_storage_StorageBlockInfo
-                      quickstep_utility_Macros
-                      tmb
-                      ${GFLAGS_LIB_NAME})
-if (ENABLE_DISTRIBUTED)
-  target_link_libraries(quickstep_queryexecution_PolicyEnforcerDistributed
-                        glog
-                        quickstep_catalog_CatalogDatabase
-                        quickstep_catalog_CatalogRelation
-                        quickstep_catalog_CatalogRelationSchema
-                        quickstep_catalog_CatalogRelationStatistics
-                        quickstep_catalog_CatalogTypedefs
-                        quickstep_catalog_Catalog_proto
-                        quickstep_queryexecution_PolicyEnforcerBase
-                        quickstep_queryexecution_QueryContext
-                        quickstep_queryexecution_QueryContext_proto
-                        quickstep_queryexecution_QueryExecutionMessages_proto
-                        quickstep_queryexecution_QueryExecutionState
-                        quickstep_queryexecution_QueryExecutionTypedefs
-                        quickstep_queryexecution_QueryExecutionUtil
-                        quickstep_queryexecution_QueryManagerBase
-                        quickstep_queryexecution_QueryManagerDistributed
-                        quickstep_queryexecution_ShiftbossDirectory
-                        quickstep_queryoptimizer_QueryHandle
-                        quickstep_queryoptimizer_QueryProcessor
-                        quickstep_storage_StorageBlock
-                        quickstep_storage_StorageBlockInfo
-                        quickstep_storage_StorageManager
-                        quickstep_storage_TupleIdSequence
-                        quickstep_storage_TupleStorageSubBlock
-                        quickstep_types_TypedValue
-                        quickstep_utility_ExecutionDAGVisualizer
-                        quickstep_utility_Macros
-                        tmb
-                        ${GFLAGS_LIB_NAME})
-endif(ENABLE_DISTRIBUTED)
+                      quickstep_utility_Macros)
 target_link_libraries(quickstep_queryexecution_PolicyEnforcerSingleNode
+                      ${GFLAGS_LIB_NAME}
                       glog
                       quickstep_catalog_CatalogTypedefs
                       quickstep_queryexecution_PolicyEnforcerBase
@@ -200,8 +115,7 @@ target_link_libraries(quickstep_queryexecution_PolicyEnforcerSingleNode
                       quickstep_queryexecution_WorkerMessage
                       quickstep_queryoptimizer_QueryHandle
                       quickstep_utility_Macros
-                      tmb
-                      ${GFLAGS_LIB_NAME})
+                      tmb)
 target_link_libraries(quickstep_queryexecution_ProbabilityStore
                       glog
                       quickstep_utility_Macros)
@@ -230,8 +144,10 @@ target_link_libraries(quickstep_queryexecution_QueryContext
                       quickstep_utility_SortConfiguration
                       quickstep_utility_lipfilter_LIPFilter
                       quickstep_utility_lipfilter_LIPFilterDeployment
-                      quickstep_utility_lipfilter_LIPFilterFactory)
+                      quickstep_utility_lipfilter_LIPFilterFactory
+                      tmb)
 target_link_libraries(quickstep_queryexecution_QueryContext_proto
+                      ${PROTOBUF_LIBRARY}
                       quickstep_expressions_Expressions_proto
                       quickstep_expressions_tablegenerator_GeneratorFunction_proto
                       quickstep_storage_AggregationOperationState_proto
@@ -240,13 +156,12 @@ target_link_libraries(quickstep_queryexecution_QueryContext_proto
                       quickstep_storage_WindowAggregationOperationState_proto
                       quickstep_types_containers_Tuple_proto
                       quickstep_utility_SortConfiguration_proto
-                      quickstep_utility_lipfilter_LIPFilter_proto
-                      ${PROTOBUF_LIBRARY})
+                      quickstep_utility_lipfilter_LIPFilter_proto)
 target_link_libraries(quickstep_queryexecution_QueryExecutionMessages_proto
+                      ${PROTOBUF_LIBRARY}
                       quickstep_catalog_Catalog_proto
                       quickstep_queryexecution_QueryContext_proto
-                      quickstep_relationaloperators_WorkOrder_proto
-                      ${PROTOBUF_LIBRARY})
+                      quickstep_relationaloperators_WorkOrder_proto)
 target_link_libraries(quickstep_queryexecution_QueryExecutionState
                       glog
                       quickstep_utility_Macros)
@@ -254,11 +169,14 @@ target_link_libraries(quickstep_queryexecution_QueryExecutionTypedefs
                       quickstep_threading_ThreadIDBasedMap
                       tmb)
 target_link_libraries(quickstep_queryexecution_QueryExecutionUtil
+                      glog
                       quickstep_queryexecution_AdmitRequestMessage
                       quickstep_queryexecution_QueryExecutionTypedefs
                       quickstep_utility_Macros
                       tmb)
 target_link_libraries(quickstep_queryexecution_QueryManagerBase
+                      ${GFLAGS_LIB_NAME}
+                      glog
                       quickstep_catalog_CatalogTypedefs
                       quickstep_queryexecution_QueryContext
                       quickstep_queryexecution_QueryExecutionState
@@ -269,9 +187,131 @@ target_link_libraries(quickstep_queryexecution_QueryManagerBase
                       quickstep_storage_StorageBlockInfo
                       quickstep_utility_DAG
                       quickstep_utility_ExecutionDAGVisualizer
+                      quickstep_utility_Macros)
+target_link_libraries(quickstep_queryexecution_QueryManagerSingleNode
+                      glog
+                      quickstep_catalog_CatalogDatabase
+                      quickstep_catalog_CatalogTypedefs
+                      quickstep_queryexecution_QueryContext
+                      quickstep_queryexecution_QueryExecutionState
+                      quickstep_queryexecution_QueryManagerBase
+                      quickstep_queryexecution_WorkOrdersContainer
+                      quickstep_queryexecution_WorkerMessage
+                      quickstep_queryoptimizer_QueryHandle
+                      quickstep_relationaloperators_RebuildWorkOrder
+                      quickstep_relationaloperators_RelationalOperator
+                      quickstep_storage_InsertDestination
+                      quickstep_storage_StorageBlock
+                      quickstep_utility_DAG
+                      quickstep_utility_Macros
+                      tmb)
+target_link_libraries(quickstep_queryexecution_WorkOrderProtosContainer
+                      glog
+                      quickstep_relationaloperators_WorkOrder_proto
+                      quickstep_utility_Macros)
+target_link_libraries(quickstep_queryexecution_WorkOrderSelectionPolicy
+                      glog
+                      quickstep_utility_Macros)
+target_link_libraries(quickstep_queryexecution_WorkOrdersContainer
+                      glog
+                      quickstep_queryexecution_WorkOrderSelectionPolicy
+                      quickstep_relationaloperators_WorkOrder
                       quickstep_utility_Macros
-                      ${GFLAGS_LIB_NAME})
+                      quickstep_utility_PtrVector)
+target_link_libraries(quickstep_queryexecution_Worker
+                      glog
+                      quickstep_queryexecution_QueryExecutionMessages_proto
+                      quickstep_queryexecution_QueryExecutionTypedefs
+                      quickstep_queryexecution_QueryExecutionUtil
+                      quickstep_queryexecution_WorkerMessage
+                      quickstep_relationaloperators_WorkOrder
+                      quickstep_threading_Thread
+                      quickstep_threading_ThreadIDBasedMap
+                      quickstep_threading_ThreadUtil
+                      quickstep_utility_Macros
+                      tmb)
+target_link_libraries(quickstep_queryexecution_WorkerDirectory
+                      quickstep_queryexecution_QueryExecutionTypedefs
+                      quickstep_utility_Macros)
+target_link_libraries(quickstep_queryexecution_WorkerSelectionPolicy
+                      quickstep_queryexecution_WorkerDirectory
+                      quickstep_utility_Macros)
+
 if (ENABLE_DISTRIBUTED)
+  target_link_libraries(quickstep_queryexecution_BlockLocator
+                        glog
+                        quickstep_queryexecution_QueryExecutionMessages_proto
+                        quickstep_queryexecution_QueryExecutionTypedefs
+                        quickstep_queryexecution_QueryExecutionUtil
+                        quickstep_storage_StorageBlockInfo
+                        quickstep_storage_StorageConstants
+                        quickstep_threading_SpinSharedMutex
+                        quickstep_threading_Thread
+                        quickstep_threading_ThreadUtil
+                        quickstep_utility_Macros
+                        tmb)
+  target_link_libraries(quickstep_queryexecution_BlockLocatorUtil
+                        glog
+                        quickstep_queryexecution_QueryExecutionMessages_proto
+                        quickstep_queryexecution_QueryExecutionTypedefs
+                        quickstep_storage_StorageBlockInfo
+                        tmb)
+  target_link_libraries(quickstep_queryexecution_ForemanDistributed
+                        ${GFLAGS_LIB_NAME}
+                        glog
+                        quickstep_catalog_CatalogDatabase
+                        quickstep_catalog_CatalogRelation
+                        quickstep_catalog_CatalogTypedefs
+                        quickstep_catalog_Catalog_proto
+                        quickstep_cli_Flags
+                        quickstep_queryexecution_AdmitRequestMessage
+                        quickstep_queryexecution_BlockLocator
+                        quickstep_queryexecution_BlockLocatorUtil
+                        quickstep_queryexecution_ForemanBase
+                        quickstep_queryexecution_PolicyEnforcerBase
+                        quickstep_queryexecution_PolicyEnforcerDistributed
+                        quickstep_queryexecution_QueryContext
+                        quickstep_queryexecution_QueryExecutionMessages_proto
+                        quickstep_queryexecution_QueryExecutionTypedefs
+                        quickstep_queryexecution_QueryExecutionUtil
+                        quickstep_queryexecution_ShiftbossDirectory
+                        quickstep_relationaloperators_WorkOrder_proto
+                        quickstep_storage_DataExchangerAsync
+                        quickstep_storage_StorageBlockInfo
+                        quickstep_storage_StorageManager
+                        quickstep_threading_ThreadUtil
+                        quickstep_utility_Macros
+                        tmb)
+  target_link_libraries(quickstep_queryexecution_PolicyEnforcerDistributed
+                        ${GFLAGS_LIB_NAME}
+                        glog
+                        quickstep_catalog_CatalogDatabase
+                        quickstep_catalog_CatalogRelation
+                        quickstep_catalog_CatalogRelationSchema
+                        quickstep_catalog_CatalogRelationStatistics
+                        quickstep_catalog_CatalogTypedefs
+                        quickstep_catalog_Catalog_proto
+                        quickstep_queryexecution_PolicyEnforcerBase
+                        quickstep_queryexecution_QueryContext
+                        quickstep_queryexecution_QueryContext_proto
+                        quickstep_queryexecution_QueryExecutionMessages_proto
+                        quickstep_queryexecution_QueryExecutionState
+                        quickstep_queryexecution_QueryExecutionTypedefs
+                        quickstep_queryexecution_QueryExecutionUtil
+                        quickstep_queryexecution_QueryManagerBase
+                        quickstep_queryexecution_QueryManagerDistributed
+                        quickstep_queryexecution_ShiftbossDirectory
+                        quickstep_queryoptimizer_QueryHandle
+                        quickstep_queryoptimizer_QueryProcessor
+                        quickstep_storage_StorageBlock
+                        quickstep_storage_StorageBlockInfo
+                        quickstep_storage_StorageManager
+                        quickstep_storage_TupleIdSequence
+                        quickstep_storage_TupleStorageSubBlock
+                        quickstep_types_TypedValue
+                        quickstep_utility_ExecutionDAGVisualizer
+                        quickstep_utility_Macros
+                        tmb)
   target_link_libraries(quickstep_queryexecution_QueryManagerDistributed
                         quickstep_catalog_CatalogTypedefs
                         quickstep_queryexecution_BlockLocator
@@ -290,24 +330,6 @@ if (ENABLE_DISTRIBUTED)
                         quickstep_utility_Macros
                         quickstep_utility_lipfilter_LIPFilter_proto
                         tmb)
-endif(ENABLE_DISTRIBUTED)
-target_link_libraries(quickstep_queryexecution_QueryManagerSingleNode
-                      quickstep_catalog_CatalogDatabase
-                      quickstep_catalog_CatalogTypedefs
-                      quickstep_queryexecution_QueryContext
-                      quickstep_queryexecution_QueryExecutionState
-                      quickstep_queryexecution_QueryManagerBase
-                      quickstep_queryexecution_WorkOrdersContainer
-                      quickstep_queryexecution_WorkerMessage
-                      quickstep_queryoptimizer_QueryHandle
-                      quickstep_relationaloperators_RebuildWorkOrder
-                      quickstep_relationaloperators_RelationalOperator
-                      quickstep_storage_InsertDestination
-                      quickstep_storage_StorageBlock
-                      quickstep_utility_DAG
-                      quickstep_utility_Macros
-                      tmb)
-if (ENABLE_DISTRIBUTED)
   target_link_libraries(quickstep_queryexecution_Shiftboss
                         glog
                         quickstep_catalog_CatalogDatabase
@@ -335,37 +357,6 @@ if (ENABLE_DISTRIBUTED)
                         quickstep_utility_Macros
                         tmb)
 endif(ENABLE_DISTRIBUTED)
-target_link_libraries(quickstep_queryexecution_WorkOrderProtosContainer
-                      glog
-                      quickstep_relationaloperators_WorkOrder_proto
-                      quickstep_utility_Macros)
-target_link_libraries(quickstep_queryexecution_WorkOrdersContainer
-                      glog
-                      quickstep_queryexecution_WorkOrderSelectionPolicy
-                      quickstep_relationaloperators_WorkOrder
-                      quickstep_utility_Macros
-                      quickstep_utility_PtrVector)
-target_link_libraries(quickstep_queryexecution_Worker
-                      glog
-                      quickstep_queryexecution_QueryExecutionMessages_proto
-                      quickstep_queryexecution_QueryExecutionTypedefs
-                      quickstep_queryexecution_QueryExecutionUtil
-                      quickstep_queryexecution_WorkerMessage
-                      quickstep_relationaloperators_WorkOrder
-                      quickstep_threading_Thread
-                      quickstep_threading_ThreadIDBasedMap
-                      quickstep_threading_ThreadUtil
-                      quickstep_utility_Macros
-                      tmb)
-target_link_libraries(quickstep_queryexecution_WorkerDirectory
-                      quickstep_queryexecution_QueryExecutionTypedefs
-                      quickstep_utility_Macros)
-target_link_libraries(quickstep_queryexecution_WorkOrderSelectionPolicy
-                      glog
-                      quickstep_utility_Macros)
-target_link_libraries(quickstep_queryexecution_WorkerSelectionPolicy
-                      quickstep_queryexecution_WorkerDirectory
-                      quickstep_utility_Macros)
 
 # Module all-in-one library:
 add_library(quickstep_queryexecution ../empty_src.cpp QueryExecutionModule.hpp)
@@ -386,12 +377,13 @@ target_link_libraries(quickstep_queryexecution
                       quickstep_queryexecution_QueryManagerBase
                       quickstep_queryexecution_QueryManagerSingleNode
                       quickstep_queryexecution_WorkOrderProtosContainer
+                      quickstep_queryexecution_WorkOrderSelectionPolicy
                       quickstep_queryexecution_WorkOrdersContainer
                       quickstep_queryexecution_Worker
                       quickstep_queryexecution_WorkerDirectory
                       quickstep_queryexecution_WorkerMessage
-                      quickstep_queryexecution_WorkOrderSelectionPolicy
                       quickstep_queryexecution_WorkerSelectionPolicy)
+
 if (ENABLE_DISTRIBUTED)
   target_link_libraries(quickstep_queryexecution
                         quickstep_queryexecution_BlockLocator
@@ -409,6 +401,7 @@ if (ENABLE_DISTRIBUTED)
                  "${CMAKE_CURRENT_SOURCE_DIR}/tests/BlockLocator_unittest.cpp")
   target_link_libraries(BlockLocator_unittest
                         ${GFLAGS_LIB_NAME}
+                        ${LIBS}
                         glog
                         gtest
                         quickstep_catalog_CatalogAttribute
@@ -425,13 +418,12 @@ if (ENABLE_DISTRIBUTED)
                         quickstep_storage_StorageManager
                         quickstep_types_TypeFactory
                         quickstep_types_TypeID
-                        tmb
-                        ${LIBS})
+                        tmb)
   add_test(BlockLocator_unittest BlockLocator_unittest)
 endif(ENABLE_DISTRIBUTED)
 
 add_executable(ProbabilityStore_unittest
-        "${CMAKE_CURRENT_SOURCE_DIR}/tests/ProbabilityStore_unittest.cpp")
+               "${CMAKE_CURRENT_SOURCE_DIR}/tests/ProbabilityStore_unittest.cpp")
 target_link_libraries(ProbabilityStore_unittest
                       gtest
                       gtest_main
@@ -439,7 +431,7 @@ target_link_libraries(ProbabilityStore_unittest
 add_test(ProbabilityStore_unittest ProbabilityStore_unittest)
 
 add_executable(QueryManagerSingleNode_unittest
-  "${CMAKE_CURRENT_SOURCE_DIR}/tests/QueryManagerSingleNode_unittest.cpp")
+               "${CMAKE_CURRENT_SOURCE_DIR}/tests/QueryManagerSingleNode_unittest.cpp")
 target_link_libraries(QueryManagerSingleNode_unittest
                       glog
                       gtest
@@ -483,7 +475,7 @@ target_link_libraries(WorkOrdersContainer_unittest
 add_test(WorkOrdersContainer_unittest WorkOrdersContainer_unittest)
 
 add_executable(WorkerDirectory_unittest
-  "${CMAKE_CURRENT_SOURCE_DIR}/tests/WorkerDirectory_unittest.cpp")
+               "${CMAKE_CURRENT_SOURCE_DIR}/tests/WorkerDirectory_unittest.cpp")
 target_link_libraries(WorkerDirectory_unittest
                       gtest
                       gtest_main
@@ -492,7 +484,7 @@ target_link_libraries(WorkerDirectory_unittest
 add_test(WorkerDirectory_unittest WorkerDirectory_unittest)
 
 add_executable(WorkerSelectionPolicy_unittest
-  "${CMAKE_CURRENT_SOURCE_DIR}/tests/WorkerSelectionPolicy_unittest.cpp")
+               "${CMAKE_CURRENT_SOURCE_DIR}/tests/WorkerSelectionPolicy_unittest.cpp")
 target_link_libraries(WorkerSelectionPolicy_unittest
                       gtest
                       gtest_main

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/query_optimizer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/query_optimizer/CMakeLists.txt b/query_optimizer/CMakeLists.txt
index ab4f6ec..17d6eb0 100644
--- a/query_optimizer/CMakeLists.txt
+++ b/query_optimizer/CMakeLists.txt
@@ -53,6 +53,7 @@ add_library(quickstep_queryoptimizer_Validator ../empty_src.cpp Validator.hpp)
 
 # Link dependencies:
 target_link_libraries(quickstep_queryoptimizer_ExecutionGenerator
+                      ${GFLAGS_LIB_NAME}
                       glog
                       quickstep_catalog_CatalogAttribute
                       quickstep_catalog_CatalogDatabase
@@ -163,10 +164,6 @@ target_link_libraries(quickstep_queryoptimizer_ExecutionGenerator
                       quickstep_utility_BarrieredReadWriteConcurrentBitVector
                       quickstep_utility_Macros
                       quickstep_utility_SqlError)
-if (ENABLE_DISTRIBUTED)
-  target_link_libraries(quickstep_queryoptimizer_ExecutionGenerator
-                        quickstep_catalog_Catalog_proto)
-endif()
 target_link_libraries(quickstep_queryoptimizer_LIPFilterGenerator
                       glog
                       quickstep_catalog_CatalogAttribute
@@ -189,6 +186,7 @@ target_link_libraries(quickstep_queryoptimizer_LogicalGenerator
                       glog
                       quickstep_parser_ParseStatement
                       quickstep_queryoptimizer_OptimizerContext
+                      quickstep_queryoptimizer_Validator
                       quickstep_queryoptimizer_logical_Logical
                       quickstep_queryoptimizer_resolver_Resolver
                       quickstep_queryoptimizer_rules_CollapseProject
@@ -197,7 +195,6 @@ target_link_libraries(quickstep_queryoptimizer_LogicalGenerator
                       quickstep_queryoptimizer_rules_PushDownSemiAntiJoin
                       quickstep_queryoptimizer_rules_Rule
                       quickstep_queryoptimizer_rules_UnnestSubqueries
-                      quickstep_queryoptimizer_Validator
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_queryoptimizer_LogicalToPhysicalMapper
                       quickstep_queryoptimizer_logical_Logical
@@ -214,12 +211,14 @@ target_link_libraries(quickstep_queryoptimizer_OptimizerContext
                       quickstep_queryoptimizer_expressions_ExprId
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_queryoptimizer_OptimizerTree
+                      glog
                       quickstep_catalog_Catalog_proto
                       quickstep_storage_StorageBlockLayout_proto
                       quickstep_utility_Macros
                       quickstep_utility_TreeStringSerializable)
 target_link_libraries(quickstep_queryoptimizer_PhysicalGenerator
                       ${GFLAGS_LIB_NAME}
+                      glog
                       quickstep_queryoptimizer_LogicalToPhysicalMapper
                       quickstep_queryoptimizer_Validator
                       quickstep_queryoptimizer_logical_Logical
@@ -268,6 +267,11 @@ target_link_libraries(quickstep_queryoptimizer_Validator
                       quickstep_queryoptimizer_expressions_AttributeReference
                       quickstep_queryoptimizer_expressions_ExpressionUtil)
 
+if (ENABLE_DISTRIBUTED)
+  target_link_libraries(quickstep_queryoptimizer_ExecutionGenerator
+                        quickstep_catalog_Catalog_proto)
+endif()
+
 # Module all-in-one library:
 add_library(quickstep_queryoptimizer ../empty_src.cpp QueryOptimizerModule.hpp)
 target_link_libraries(quickstep_queryoptimizer
@@ -288,4 +292,5 @@ target_link_libraries(quickstep_queryoptimizer
                       quickstep_queryoptimizer_logical
                       quickstep_queryoptimizer_physical
                       quickstep_queryoptimizer_resolver
-                      quickstep_queryoptimizer_rules)
+                      quickstep_queryoptimizer_rules
+                      quickstep_queryoptimizer_strategy)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b1785647/query_optimizer/cost_model/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/query_optimizer/cost_model/CMakeLists.txt b/query_optimizer/cost_model/CMakeLists.txt
index 3d4ee93..ad48584 100644
--- a/query_optimizer/cost_model/CMakeLists.txt
+++ b/query_optimizer/cost_model/CMakeLists.txt
@@ -49,6 +49,7 @@ target_link_libraries(quickstep_queryoptimizer_costmodel_SimpleCostModel
                       quickstep_queryoptimizer_physical_WindowAggregate
                       quickstep_utility_Macros)
 target_link_libraries(quickstep_queryoptimizer_costmodel_StarSchemaSimpleCostModel
+                      ${GFLAGS_LIB_NAME}
                       glog
                       quickstep_catalog_CatalogRelation
                       quickstep_catalog_CatalogRelationStatistics



Mime
View raw message