[GitHub] incubator-quickstep pull request #362: Add virtual destructors where needed ...

2018-10-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/362


---


[GitHub] incubator-quickstep pull request #362: Add virtual destructors where needed ...

2018-10-11 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/362#discussion_r224539118
  
--- Diff: third_party/src/tmb/tests/message_bus_unittest_common.h ---
@@ -205,7 +207,7 @@ class ConnectorThread : public Thread {
   }
 
  protected:
-  void Run() {
+  void Run() override {
--- End diff --

Add `override` destructors in this file.


---


[GitHub] incubator-quickstep pull request #362: Add virtual destructors where needed ...

2018-10-08 Thread johnchronis
GitHub user johnchronis opened a pull request:

https://github.com/apache/incubator-quickstep/pull/362

Add virtual destructors where needed to remove compile time errors.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/johnchronis/incubator-quickstep master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/362.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #362


commit 57af85b14df439008ad76f5dbea1a8bd86f93cf4
Author: johnchronis 
Date:   2018-10-08T23:01:27Z

Add virtual destructors where they are needed to remove compilations errors.

commit 99158dde956d2f45196cbf6537c1049cf9396f1c
Author: johnchronis 
Date:   2018-10-08T23:10:08Z

Fix order of virtual destructors.

commit 33be175085f177269cc431343ff87df575737cd0
Author: Yannis Chronis 
Date:   2018-10-08T23:14:09Z

Fix order of virtual destructors.

commit 286cde85b0861245d304198b0cbd18f0f2363de3
Author: Yannis Chronis 
Date:   2018-10-08T23:18:18Z

mend

commit 06d8d9f7939015f608af260eaee0764ea9cb7f8b
Author: Yannis Chronis 
Date:   2018-10-08T23:18:18Z

Fix order of virtual destructors.

commit 4a5a9a02c820d3779f8aec9b723a95e96348eddc
Author: Yannis Chronis 
Date:   2018-10-08T23:21:58Z

Merge branch 'master' of https://github.com/johnchronis/incubator-quickstep




---


[GitHub] incubator-quickstep pull request #361: Optimized the common case in pure-mem...

2018-06-28 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/361

Optimized the common case in pure-memory TMB.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep tmb-opt

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/361.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #361


commit d9e3a2af9927075bb5ad43c23a2a42f11fcbf1cd
Author: Zuyu Zhang 
Date:   2018-06-28T20:42:36Z

Optimized the common case in pure-memory TMB.




---


[GitHub] incubator-quickstep pull request #360: Fix the inclusion guard of ForemanSin...

2018-06-21 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/360


---


[GitHub] incubator-quickstep pull request #360: Fix the inclusion guard of ForemanSin...

2018-06-21 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/360

Fix the inclusion guard of ForemanSingleNode.hpp file



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
inclusion-guard-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/360.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #360


commit 5cbaa7ef877f3ab4a1d89f3e463f3a281709ec05
Author: Harshad Deshmukh 
Date:   2018-06-22T02:31:07Z

Fix the inclusion guard of ForemanSingleNode.hpp file




---


[GitHub] incubator-quickstep pull request #359: Fixed the build issues regarding tmb ...

2018-06-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/359


---


[GitHub] incubator-quickstep pull request #359: Fixed the build issues regarding tmb ...

2018-06-18 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/359

Fixed the build issues regarding tmb benchmark.

This minor PR fixed some build issues related to the tmb benchmark 
directory.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep tmb-bench-build

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/359.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #359


commit e36fc7497fb63cadff7bcb3e30f42a3c94a087e2
Author: Zuyu Zhang 
Date:   2018-06-19T01:18:26Z

Fixed the build issues regarding tmb benchmark.




---


[GitHub] incubator-quickstep pull request #358: Fix a bug in HashJoinOperator

2018-06-05 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/358


---


[GitHub] incubator-quickstep pull request #355: QUICKSTEP-127 Data provider thread

2018-06-04 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/355


---


[GitHub] incubator-quickstep pull request #357: Fixed the command execution bug in th...

2018-06-04 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/357


---


[GitHub] incubator-quickstep pull request #355: QUICKSTEP-127 Data provider thread

2018-06-04 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/355#discussion_r192827208
  
--- Diff: storage/CMakeLists.txt ---
@@ -120,6 +120,11 @@ configure_file (
 QS_PROTOBUF_GENERATE_CPP(storage_AggregationOperationState_proto_srcs
  storage_AggregationOperationState_proto_hdrs
  AggregationOperationState.proto)
+if (ENABLE_NETWORK_CLI)
+QS_PROTOBUF_GENERATE_CPP(storage_BlockWire_proto_srcs
--- End diff --

Two whitespace indentation, please.

Similarly below.


---


[GitHub] incubator-quickstep pull request #358: Fix a bug in HashJoinOperator

2018-06-03 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/358

Fix a bug in HashJoinOperator

This PR fixes a bug in `HashJoinOperator` w.r.t. the swapping of 
probe/build sides in a previous PR. 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jianqiao/incubator-quickstep fix-filter-side

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/358.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #358


commit c4a072f301593b3f92a009ba752c05b2226a0f32
Author: Jianqiao Zhu 
Date:   2018-06-03T20:38:36Z

Fix a bug of filter side in HashJoinOperator




---


[GitHub] incubator-quickstep pull request #355: QUICKSTEP-127 Data provider thread

2018-05-24 Thread hbdeshmukh
Github user hbdeshmukh commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/355#discussion_r190785380
  
--- Diff: storage/DataProviderThread.hpp ---
@@ -0,0 +1,103 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_STORAGE_DATA_PROVIDER_THREAD_HPP_
+#define QUICKSTEP_STORAGE_DATA_PROVIDER_THREAD_HPP_
+
+#include 
+
+#include "query_execution/QueryExecutionTypedefs.hpp"
+#include "storage/StorageConfig.h"
+#include "threading/Thread.hpp"
+#include "utility/Macros.hpp"
+
+#include "tmb/native_net_client_message_bus.h"
+
+namespace quickstep {
+
+class CatalogDatabase;
+class CatalogRelation;
+class QueryProcessor;
+class StorageManager;
+
+/** \addtogroup Storage
+ *  @{
+ */
+
+/**
+ * @brief A thread that provides access to query results (e.g. storage 
blocks),
+ *to Quickstep clients.
--- End diff --

This thread will be responsible to drop temporary tables created by 
queries. To perform this drop operation, it needs access to both 
CatalogDatabase and QueryProcessor. Details in the code 
[here](https://github.com/hbdeshmukh/incubator-quickstep/blob/6967ca57c448a17b63e176bf8bc1576066fe893a/storage/DataProviderThread.cpp#L79)


---


[GitHub] incubator-quickstep pull request #355: QUICKSTEP-127 Data provider thread

2018-05-24 Thread hbdeshmukh
Github user hbdeshmukh commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/355#discussion_r190785209
  
--- Diff: storage/DataProviderThread.hpp ---
@@ -0,0 +1,103 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_STORAGE_DATA_PROVIDER_THREAD_HPP_
+#define QUICKSTEP_STORAGE_DATA_PROVIDER_THREAD_HPP_
+
+#include 
+
+#include "query_execution/QueryExecutionTypedefs.hpp"
+#include "storage/StorageConfig.h"
+#include "threading/Thread.hpp"
+#include "utility/Macros.hpp"
+
+#include "tmb/native_net_client_message_bus.h"
+
+namespace quickstep {
+
+class CatalogDatabase;
+class CatalogRelation;
+class QueryProcessor;
+class StorageManager;
+
+/** \addtogroup Storage
+ *  @{
+ */
+
+/**
+ * @brief A thread that provides access to query results (e.g. storage 
blocks),
+ *to Quickstep clients.
--- End diff --

The DataProviderThread class will be part of the Quickstep server process. 
The following image describes the role of this thread. 

![image](https://user-images.githubusercontent.com/3750801/40525388-5e6225da-5fa5-11e8-818c-fc6f913f471c.png)



---


[GitHub] incubator-quickstep pull request #357: Fixed the command execution bug in th...

2018-05-21 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/357

Fixed the command execution bug in the distributed version.

This PR fixed the command execution bugs in the distributed version, and 
now it is consistent with the single-node version.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep dist-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/357.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #357


commit 89ddcb48b32f352659600cdcdc55fe059184a06a
Author: Zuyu Zhang 
Date:   2018-05-21T21:39:42Z

Fixed the command execution bug in the distributed version.




---


[GitHub] incubator-quickstep pull request #356: DO NOT MERGE: Added the grpc in Travi...

2018-05-21 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/356

DO NOT MERGE: Added the grpc in Travis CI.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep travis-grpc-new

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/356.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #356


commit d6554af49ae003e7999f4367369dc3e6242ad18b
Author: Zuyu Zhang 
Date:   2018-05-21T18:42:15Z

Added the grpc in Travis CI.




---


[GitHub] incubator-quickstep pull request #355: QUICKSTEP-127 Data provider thread

2018-05-21 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/355#discussion_r189664042
  
--- Diff: storage/DataProviderThread.hpp ---
@@ -0,0 +1,103 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_STORAGE_DATA_PROVIDER_THREAD_HPP_
+#define QUICKSTEP_STORAGE_DATA_PROVIDER_THREAD_HPP_
+
+#include 
+
+#include "query_execution/QueryExecutionTypedefs.hpp"
+#include "storage/StorageConfig.h"
+#include "threading/Thread.hpp"
+#include "utility/Macros.hpp"
+
+#include "tmb/native_net_client_message_bus.h"
+
+namespace quickstep {
+
+class CatalogDatabase;
+class CatalogRelation;
+class QueryProcessor;
+class StorageManager;
+
+/** \addtogroup Storage
+ *  @{
+ */
+
+/**
+ * @brief A thread that provides access to query results (e.g. storage 
blocks),
+ *to Quickstep clients.
--- End diff --

Could you please provide more info regarding this class, including which 
class will own this class, and why it needs write permissions to both 
`CatalogDatabase` and `QueryProcessor`? Thanks!


---


[GitHub] incubator-quickstep pull request #355: QUICKSTEP-127 Data provider thread

2018-05-21 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/355

QUICKSTEP-127 Data provider thread 

- Thread used for receiving block requests from clients and sending the
contents of a block back to the client.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
data-provider-thread

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/355.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #355


commit 6967ca57c448a17b63e176bf8bc1576066fe893a
Author: Harshad Deshmukh 
Date:   2018-04-06T21:00:54Z

Data Provider thread added.

- Thread used for receiving block requests from clients and sending the
contents of a block back to the client.




---


[GitHub] incubator-quickstep pull request #347: QUICKSTEP-121: Added the self-join su...

2018-05-09 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/347


---


[GitHub] incubator-quickstep pull request #353: Minor bug fixes and refactors.

2018-05-09 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/353


---


[GitHub] incubator-quickstep pull request #354: Fixed the union-all elimiation case w...

2018-05-07 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/354

Fixed the union-all elimiation case where some project expression is not an 
AttributeReference.

This PR fixed for the case where the only one child of the union-all query 
is non-empty, and the child has a non-AttributeReference project expression:

```
SELECT 1 AS a FROM not_empty
UNION ALL
SELECT 0 AS a FROM empty;
```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep 
eliminate-empty-node-bug-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/354.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #354


commit f7d1132672f4ef6399dbbe77541f93911c2d640b
Author: Zuyu Zhang 
Date:   2018-05-08T04:58:35Z

Fixed the union-all elimiation case where some project expression is not an 
AttributeReference.




---


[GitHub] incubator-quickstep pull request #353: Minor bug fixes and refactors.

2018-05-07 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/353

Minor bug fixes and refactors.

This PR contains most work from @jianqiao when working on the datalog 
branch, including bug fix and some refactors.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep bug-fix-refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/353.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #353


commit 7aa91392e67cdb96a75e36522f243c71330ab811
Author: Zuyu Zhang 
Date:   2018-05-07T21:08:35Z

Minor bug fixes and refactors.




---


[GitHub] incubator-quickstep pull request #351: Use Exactness info in Catalog stats.

2018-05-07 Thread zuyu
Github user zuyu closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/351


---


[GitHub] incubator-quickstep pull request #348: Refactored ScalarCaseExpression.

2018-05-04 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/348


---


[GitHub] incubator-quickstep pull request #350: Fixed the bug regarding EliminateEmpt...

2018-05-04 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/350


---


[GitHub] incubator-quickstep pull request #350: Fixed the bug regarding EliminateEmpt...

2018-05-04 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/350

Fixed the bug regarding EliminateEmptyNode and InsertSelection.

This PR fixed a bug regarding `EliminateEmptyNode` and `InsertSelection` 
that could be easily reproduced as the following:
```
CREATE TABLE temp (a int);
\analyze
INSERT INTO temp SELECT i FROM generate_series(1, 100) AS gs(i);
```

The problem is that `InsertSelection` allows the destination table to be 
empty, but the rule does not catch that.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep 
elimination-rule-bug-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/350.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #350


commit 77287a78890284139273dd5344e7d9b141f7ee25
Author: Zuyu Zhang 
Date:   2018-05-04T18:04:02Z

Fixed the bug regarding EliminateEmptyNode and InsertSelection.




---


[GitHub] incubator-quickstep pull request #349: Fixed the bug regarding EliminateEmpt...

2018-05-03 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/349


---


[GitHub] incubator-quickstep pull request #318: DO NOT MERGE: Optimizing Hash reparti...

2018-05-03 Thread zuyu
Github user zuyu closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/318


---


[GitHub] incubator-quickstep pull request #349: Fixed the bug regarding EliminateEmpt...

2018-05-02 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/349

Fixed the bug regarding EliminateEmptyNode and Analyze command.

This PR fixed a bug introduced in #342. The problem was that that rule does 
not distinguish between an analyze command and an aggregate query. Thus, both 
reduces into a `SELECT` query on a temp table. Ironically, 
`quickstep_cli_tests_commandexecutor_analyze` does not proof the correctness of 
the rule because `\analyze` has no effect under the rule and no stats added.

In other words, we could easily reproduce the bug:
```
CREATE TABLE r (a int);
\analyze r
SELECT COUNT(*) FROM r;  // this produce nothing (in 0 row), instead of a 
ZERO (in 1 row).
```

This fix adds a flag for `\analyze` command, and also transforms an 
aggregate query correctly.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep 
elimination-rule-bug-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/349.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #349


commit 8cd618cd5d8d2ea2a7383fb9d4be65227807b60d
Author: Zuyu Zhang 
Date:   2018-05-03T01:24:01Z

Fixed the bug regarding EliminateEmptyNode and Analyze command.




---


[GitHub] incubator-quickstep pull request #348: Refactored ScalarCaseExpression.

2018-05-02 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/348

Refactored ScalarCaseExpression.

This PR does the following:
 1. Moved the static methods into the cpp file.
 1. Added a fast path for `getAllValuesForJoin`, similar to other existing 
methods.
 1. Added more unit tests to cover the join cases with a static branch.
 1. Removed a unnecessary overridden virtual function 
`getRelationIdForValueAccessor`.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep case-expr-opt

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/348.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #348


commit dc4b5ddedb11077ae6a6a3a92a841a42c4a8b819
Author: Zuyu Zhang 
Date:   2018-05-02T21:06:59Z

Refactored ScalarCaseExpression.




---


[GitHub] incubator-quickstep pull request #347: DO NOT MERGE: QUICKSTEP-121: Added th...

2018-04-30 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/347

DO NOT MERGE: QUICKSTEP-121: Added the self-join support.

This PR added the self-join support by assigning the join side info, 
instead of relying on the relation id.

Note that now `NestedLoopsJoin` has to use the same term as `HashJoin` 
w.r.t. join side. In the other words, the left side is the `probe`, while the 
right is the `build`. Also, the join result pair is in the format of 
``.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep self-join

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/347.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #347


commit 4055d65a207b63775f2cf4c4841b33da15d70cd2
Author: Zuyu Zhang 
Date:   2018-04-30T03:50:02Z

Added the self-join support.




---


[GitHub] incubator-quickstep pull request #346: QUICKSTEP-124: Add a python script to...

2018-04-27 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/346


---


[GitHub] incubator-quickstep pull request #346: Add a python script to auto fix CMake...

2018-04-27 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/346

Add a python script to auto fix CMakeLists files

This PR adds a script that intends to help improve developer productivity 
by automatically fixing `CMakeLists.txt` files for the Quickstep project (with 
best effort).

The script will do the following things:
- Scan the repo's subdirectories and collect `#include` information from 
all source code files.
- Parse existing `CMakeLists.txt` files and convert all "recognized" 
commands into proper intermediate representations -- the "unrecognized" part 
will be kept as "verbal" lines.
- Resolve subdirectories, targets and link dependencies. Add / delete / 
update the corresponding entries.
- Convert the intermediate representations back to `CMakeLists.txt` files.

**NOTE:** Currently the script is at its initial stage and will not update 
tests or conditional targets (i.e. those within cmake `if` commands). It is 
likely to work well if you just create/delete some files or add/remove some 
`#include`'s -- otherwise additional manual fixes may need to be done after 
applying the script.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jianqiao/incubator-quickstep 
autofix-cmake-tool

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/346.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #346


commit 73d796dee760a03a91d55cb0fe4d8f073f831237
Author: Jianqiao Zhu 
Date:   2018-04-27T22:28:51Z

Add a python script to auto fix CMakeLists files




---


[GitHub] incubator-quickstep pull request #343: Fix all CMakeLists.txt for automated ...

2018-04-27 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/343


---


[GitHub] incubator-quickstep pull request #345: Minor code style fix.

2018-04-26 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/345


---


[GitHub] incubator-quickstep pull request #345: Minor code style fix.

2018-04-26 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/345

Minor code style fix.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep code-style-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/345.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #345


commit 68f006e487b251901d118d26912b4d58dd3e93e1
Author: Zuyu Zhang 
Date:   2018-04-27T02:39:18Z

Code style fix.




---


[GitHub] incubator-quickstep pull request #344: Quickstep-123: Fixed the missing 'has...

2018-04-26 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/344

Quickstep-123: Fixed the missing 'has_repartition' in FilterJoin.

Added the missing `has_repartition` in `FilterJoin`.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep filter-join-bug-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/344.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #344


commit 1772b8a1cd9664c9553a566efdafb97ddd427c57
Author: Zuyu Zhang 
Date:   2018-04-27T02:20:01Z

Fixed the missing 'has_repartition' in FilterJoin.




---


[GitHub] incubator-quickstep pull request #343: Fix all CMakeLists.txt for automated ...

2018-04-26 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/343

Fix all CMakeLists.txt for automated processing

This PR fixes and adjusts the style of all `CMakeLists.txt` so that they 
become stable (i.e. well-formatted) to be processed by an automated tool.

The above mentioned tool will be proposed in a subsequent PR. It is 
intended to help improve developer productivity as it scans source code 
dependencies and automatically fixes cmakelists.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jianqiao/incubator-quickstep autofix-cmake

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/343.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #343


commit 3169b5646aecae35485a76f4439a121d9f66b3e2
Author: Jianqiao Zhu 
Date:   2018-04-18T05:54:31Z

Fix and rearrange all CMakeLists.txt so that they are ready to be processed 
and regenrated by an automation tool.




---


[GitHub] incubator-quickstep pull request #342: Quickstep-119: Added the rule that el...

2018-04-26 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/342


---


[GitHub] incubator-quickstep pull request #341: Used MergeFrom instead of CopyFrom.

2018-04-25 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/341


---


[GitHub] incubator-quickstep pull request #342: DO NOT MERGE: Quickstep-119: Added th...

2018-04-21 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/342

DO NOT MERGE: Quickstep-119: Added the rule that eliminates a HashJoin to a 
Selection if possible.

This PR adds an optimization rule that eliminates a join if at least one 
side is empty.

TODO: add unit tests.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep simplify-join-rule

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/342.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #342


commit c670a5bec9374f9c613461114c234eeea25f2de1
Author: Zuyu Zhang 
Date:   2018-04-18T22:15:34Z

Added the rule that eliminates a HashJoin to a Selection if possible.




---


[GitHub] incubator-quickstep pull request #341: Used MergeFrom instead of CopyFrom.

2018-04-20 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/341

Used MergeFrom instead of CopyFrom.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep use-merge-from

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/341.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #341


commit 612e103cb590a8f7735c5e7af7529c4c68956bbf
Author: Zuyu Zhang 
Date:   2018-04-20T20:46:50Z

Used MergeFrom instead of CopyFrom.




---


[GitHub] incubator-quickstep pull request #340: More informative error for BlockNotFo...

2018-04-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/340


---


[GitHub] incubator-quickstep pull request #340: More informative error for BlockNotFo...

2018-04-17 Thread hbdeshmukh
Github user hbdeshmukh commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/340#discussion_r182228415
  
--- Diff: storage/StorageErrors.hpp ---
@@ -61,9 +61,16 @@ class BlockMemoryTooSmall : public std::exception {
  **/
 class BlockNotFoundInMemory : public std::exception {
  public:
+  BlockNotFoundInMemory(int block_id) : block_id_(block_id) {}
+
   virtual const char* what() const throw() {
-return "BlockNotFoundInMemory: The specified block was not found in 
memory";
+std::string message = "BlockNotFoundInMemory: The specified block with 
ID "
+  + std::to_string(block_id_ )+ " was not found in memory";
+return message.c_str();
--- End diff --

My bad, that's a stupid mistake. Thanks for pointing out. 


---


[GitHub] incubator-quickstep pull request #340: More informative error for BlockNotFo...

2018-04-17 Thread jianqiao
Github user jianqiao commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/340#discussion_r182212888
  
--- Diff: storage/StorageErrors.hpp ---
@@ -61,9 +61,16 @@ class BlockMemoryTooSmall : public std::exception {
  **/
 class BlockNotFoundInMemory : public std::exception {
  public:
+  BlockNotFoundInMemory(int block_id) : block_id_(block_id) {}
+
   virtual const char* what() const throw() {
-return "BlockNotFoundInMemory: The specified block was not found in 
memory";
+std::string message = "BlockNotFoundInMemory: The specified block with 
ID "
+  + std::to_string(block_id_ )+ " was not found in memory";
+return message.c_str();
   }
+
+ private:
+  int block_id_;
--- End diff --

Suggested fix:
```
  const std::string block_id_message_;
```


---


[GitHub] incubator-quickstep pull request #340: More informative error for BlockNotFo...

2018-04-17 Thread jianqiao
Github user jianqiao commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/340#discussion_r182210127
  
--- Diff: storage/StorageErrors.hpp ---
@@ -61,9 +61,16 @@ class BlockMemoryTooSmall : public std::exception {
  **/
 class BlockNotFoundInMemory : public std::exception {
  public:
+  BlockNotFoundInMemory(int block_id) : block_id_(block_id) {}
--- End diff --

Minor style fix:
```
explicit BlockNotFoundInMemory(const int block_id) : ...
```


---


[GitHub] incubator-quickstep pull request #339: Upgrade cmake version.

2018-04-02 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/339

Upgrade cmake version.

Upgrading CMake, as is required by glog which is a third party dependency 
(discussed in #327). 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
upgrade-cmake-min-version

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/339.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #339


commit 502960d06faa730a02755c316b28c93fbf779a7c
Author: Harshad Deshmukh 
Date:   2018-04-02T16:34:14Z

Upgrade cmake version.




---


[GitHub] incubator-quickstep pull request #336: Fixed the bug that Executor / Cli doe...

2018-03-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/336


---


[GitHub] incubator-quickstep pull request #335: DO NOT MERGE: Dockerfile Support for ...

2018-03-14 Thread yuanchenl
Github user yuanchenl closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/335


---


[GitHub] incubator-quickstep pull request #338: Fixed the gRPC Problem for Data Excha...

2018-03-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/338


---


[GitHub] incubator-quickstep pull request #338: Fixed the gRPC Problem for Data Excha...

2018-03-13 Thread yuanchenl
GitHub user yuanchenl opened a pull request:

https://github.com/apache/incubator-quickstep/pull/338

Fixed the gRPC Problem for Data Exchange

Fixed the data exchange problem encountered in distributed quickstep.

It turned out that problem of data exchange is caused by the gRPC channel's 
limit on the maximum receive size (4 MiB, 4194304 Bytes).

In DataExchange.proto
`message PullResponse {
  bool is_valid = 1;
  uint64 num_slots = 2;
  bytes block = 3;
}`
the block size is 4MiB (which is fine), but there are 9 bytes of overhead 
(num_slots 8 bytes and is_valid 1 byte). These extra bytes are the essential 
reason that the data exchange failed.
In this commit, I set the limit of maximum receive size to 4194213 (4MiB + 
9bytes), which is right enough for us. 
With this commit, the distributed quickstep is able to pass ssb test with a 
scale factor of 10

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/yuanchenl/incubator-quickstep 
data_exchange_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/338.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #338


commit a4d4c6f4397b14516471659ad510812c09863e8d
Author: Yuanchen Li 
Date:   2018-03-13T19:58:00Z

Fixed the gRPC Problem for Data Exchange




---


[GitHub] incubator-quickstep pull request #337: Check File Handle in TextScanWorkOrde...

2018-03-07 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/337


---


[GitHub] incubator-quickstep pull request #337: Check File Handle in TextScanWorkOrde...

2018-03-06 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/337

Check File Handle in TextScanWorkOrder to avoid segfault.

This PR avoids the segfault mentioned 
[here](https://github.com/apache/incubator-quickstep/pull/336#issuecomment-370674172)
 when opening an input file that does not exist.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep fp-check

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/337.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #337


commit 934f3ab87b642fa6230a951f051cd44828b96f57
Author: Zuyu Zhang 
Date:   2018-03-06T09:00:10Z

Check File Handle in TextScanWorkOrder to avoid segfault.




---


[GitHub] incubator-quickstep pull request #336: Fixed the bug that Executor / Cli doe...

2018-02-28 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/336

Fixed the bug that Executor / Cli does not create directory for 
StorageManager.

Assigned to @jianqiao.

@yuanchenl Please test this PR using Docker. Thanks!

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep dist-directory

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/336.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #336


commit 9fdb0db4bfd616433d02aeeebe1e162e6040a7e7
Author: Zuyu Zhang 
Date:   2018-03-01T03:03:46Z

Fixed the bug that Executor / Cli does not create directory for 
StorageManager.




---


[GitHub] incubator-quickstep pull request #334: Fix iwyu include path

2018-02-27 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/334


---


[GitHub] incubator-quickstep pull request #335: Dockerfile Support for Distributed De...

2018-02-27 Thread yuanchenl
GitHub user yuanchenl opened a pull request:

https://github.com/apache/incubator-quickstep/pull/335

Dockerfile Support for Distributed Deployment



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/yuanchenl/incubator-quickstep master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/335.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #335


commit 2e8c824a54f1ed51bf8af146f3303fc6c176ce9f
Author: Yuanchen Li 
Date:   2018-02-28T01:58:22Z

Dockerfile Support for Distributed Deployment




---


[GitHub] incubator-quickstep pull request #334: Fix iwyu include path

2018-02-26 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/334

Fix iwyu include path

This PR fixes the third-party library include paths for the iwyu 
(include-what-you-use) tool.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/incubator-quickstep fix-iwyu

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/334.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #334


commit c2ed5c69b6b8dad07d7410beb0c8292ea1a746e0
Author: Jianqiao Zhu 
Date:   2017-09-01T20:07:41Z

Fix iwyu include path




---


[GitHub] incubator-quickstep pull request #332: Small adjustments in star schema cost...

2018-02-25 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/332


---


[GitHub] incubator-quickstep pull request #332: Small adjustments in star schema cost...

2018-02-23 Thread jianqiao
Github user jianqiao commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/332#discussion_r170369358
  
--- Diff: query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp ---
@@ -493,7 +493,7 @@ std::size_t 
StarSchemaSimpleCostModel::getNumDistinctValues(
   return stat.getNumDistinctValues(rel_attr_id);
 }
   }
-  return estimateCardinalityForTableReference(table_reference);
+  return estimateCardinalityForTableReference(table_reference) * 0.1;
--- End diff --

This estimation ratio can be any decimal number that is not close to `1` -- 
in that case the optimizer would choose bad plans in some situations as the 
column appears to have "unique" values.

`0.1` tends to be a reasonable choice -- we may also have `0.05`, `0.2`, 
etc., which can be adjusted later when there are actual demands.



---


[GitHub] incubator-quickstep pull request #333: Fix SeparateChainingHashTable::resize...

2018-02-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/333


---


[GitHub] incubator-quickstep pull request #333: Fix SeparateChainingHashTable::resize...

2018-02-18 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/333

Fix SeparateChainingHashTable::resize()

This PR fixes the problem that Quickstep hangs when resizing 
`SeparateChainingHashTable` during the execution of `BuildHashOperator`.

Here is a sequence of queries that reproduce the problem:
```
CREATE TABLE r(x INT, y INT);
CREATE TABLE s(x INT, y INT);
CREATE TABLE t(x INT, y INT);

INSERT INTO r SELECT 1, 1 FROM generate_series(1, 200) AS g(x);
INSERT INTO s SELECT 1, 1 FROM generate_series(1, 200) AS g(x);
INSERT INTO t SELECT 1, 1 FROM generate_series(1, 1000) AS g(x);

\analyze

SELECT COUNT(*) FROM r, s, t WHERE r.x = s.x AND r.y = s.y AND s.x = t.x 
AND s.y = t.y;
```

The problem is caused by the [`resize()` 
call](https://github.com/apache/incubator-quickstep/blob/master/storage/HashTable.hpp#L1514)
 in `HashTable::putValueAccessorCompositeKey()` when `using_prealloc` is true. 
In this case, pre-allocation decides to resize the hash table in order to 
consume all the tuples from the current value accessor. However, `resize()` 
will alway abort if the hash table is not "actually full", causing infinite 
loops.

Note that `SimpleScalarSeparateChainingHashTable` does not have the same 
problem, as its [`isFull` 
method](https://github.com/apache/incubator-quickstep/blob/master/storage/SimpleScalarSeparateChainingHashTable.hpp#L241)
 already takes `extra_buckets` into consideration.

Also note that `LinearOpenAddressingHashTable` seems to have avoided the 
hanging problem by using a [`retry_num` 
check](https://github.com/apache/incubator-quickstep/blob/master/storage/LinearOpenAddressingHashTable.hpp#L1203).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jianqiao/incubator-quickstep fix-hash-resize

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/333.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #333


commit d1dbb0d9bc2d1f001deee4039157b0be464870f4
Author: Jianqiao Zhu 
Date:   2018-02-18T07:16:07Z

Fix the hanging problem of SeparateChainingHashTable::resize()




---


[GitHub] incubator-quickstep pull request #332: Small adjustments in star schema cost...

2018-02-08 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/332#discussion_r167114902
  
--- Diff: query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp ---
@@ -493,7 +493,7 @@ std::size_t 
StarSchemaSimpleCostModel::getNumDistinctValues(
   return stat.getNumDistinctValues(rel_attr_id);
 }
   }
-  return estimateCardinalityForTableReference(table_reference);
+  return estimateCardinalityForTableReference(table_reference) * 0.1;
--- End diff --

Could you please explain more regarding why `0.1` would be a good guess for 
the number of distinct values?


---


[GitHub] incubator-quickstep pull request #332: Small adjustments in star schema cost...

2018-02-07 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/332

Small adjustments in star schema cost model for # distinct values estimation

This PR has a small adjustment in star schema cost model for # of distinct 
values estimation, together with a fix to a potential bug with 
`impliesUniqueAttributes`.

The adjustment is likely to improve query plans _when table stats are not 
present_. It does not affect SSB/TPC-H performance.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jianqiao/incubator-quickstep adjust-cost

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/332.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #332


commit 8e94a8e7ef6c99e5c64d1d96bb7283f9f1154116
Author: Jianqiao Zhu 
Date:   2018-02-07T21:42:15Z

Small adjust in star schema cost model for # distinct values




---


[GitHub] incubator-quickstep pull request #331: Add a cmake option to handle the Trav...

2018-02-05 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/331


---


[GitHub] incubator-quickstep pull request #331: Add a cmake option to handle the Trav...

2018-02-02 Thread jianqiao
GitHub user jianqiao opened a pull request:

https://github.com/apache/incubator-quickstep/pull/331

Add a cmake option to handle the Travis CI timeout problem.

This PR adds a cmake option `ENABLE_COMPARISON_INLINE_EXPANSION` to allow 
disabling of method specialization in various `Comparison`'s.

Turing the flag `OFF` will greatly reduce Quickstep compile time -- thus 
improving development productivity as well as fixing the Travis CI timeout 
problem. Note that the flag is by default `ON`, and will be [turned 
off](https://github.com/apache/incubator-quickstep/blob/539e1ebe09b5d1a2d86069ed1fdc6e9fb38c5ce7/.travis.yml#L80)
 during the Travis test.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/incubator-quickstep fix-travis-timeout

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/331.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #331


commit 539e1ebe09b5d1a2d86069ed1fdc6e9fb38c5ce7
Author: Jianqiao Zhu 
Date:   2018-02-02T23:27:59Z

Add a flag to allow disabling of Comparison inline expansion to enable 
acceleration of Quickstep build.

(for development productivity as well as solving the Travis CI timeout 
problem)




---


[GitHub] incubator-quickstep pull request #322: Generalized Hash Join - DO NOT MERGE

2018-01-23 Thread dylanpbacon
Github user dylanpbacon closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/322


---


[GitHub] incubator-quickstep pull request #329: IDE Documentation fixes

2018-01-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/329


---


[GitHub] incubator-quickstep pull request #330: Upgraded benchmark third party librar...

2018-01-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/330


---


[GitHub] incubator-quickstep pull request #330: Upgraded benchmark third party librar...

2018-01-03 Thread hbdeshmukh
GitHub user hbdeshmukh reopened a pull request:

https://github.com/apache/incubator-quickstep/pull/330

Upgraded benchmark third party library.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
benchmark-upgrade

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/330.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #330


commit 5d7aa5f0d1a898db37c46b772fca986b29c45eaa
Author: Harshad Deshmukh 
Date:   2017-12-27T19:35:07Z

Upgraded benchmark third party library.




---


[GitHub] incubator-quickstep pull request #330: Upgraded benchmark third party librar...

2018-01-03 Thread hbdeshmukh
Github user hbdeshmukh closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/330


---


[GitHub] incubator-quickstep pull request #330: Upgraded benchmark third party librar...

2017-12-27 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/330

Upgraded benchmark third party library.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
benchmark-upgrade

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/330.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #330


commit 5d7aa5f0d1a898db37c46b772fca986b29c45eaa
Author: Harshad Deshmukh 
Date:   2017-12-27T19:35:07Z

Upgraded benchmark third party library.




---


[GitHub] incubator-quickstep pull request #329: IDE Documentation fixes

2017-12-27 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/329

IDE Documentation fixes



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
ide_documentation_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/329.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #329


commit 66e27add59ab51595b6720f64e01e2c812d94a25
Author: Harshad Deshmukh 
Date:   2017-12-27T16:47:00Z

IDE Documentation fixes




---


[GitHub] incubator-quickstep pull request #319: Fixed the bug when partition w/ prune...

2017-12-21 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/319


---


[GitHub] incubator-quickstep pull request #328: QUICKSTEP-114 Upgrade cpplint

2017-12-21 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/328


---


[GitHub] incubator-quickstep pull request #328: QUICKSTEP-114 Upgrade cpplint

2017-12-21 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/328#discussion_r158369912
  
--- Diff: parser/ParseString.hpp ---
@@ -115,4 +115,4 @@ class ParseString : public ParseTreeNode {
 
 }  // namespace quickstep
 
-#endif /* QUICKSTEP_PARSER_PARSE_STRING_HPP_ */
+#endif  /* QUICKSTEP_PARSER_PARSE_STRING_HPP_ */
--- End diff --

Suggest to `// QUICKSTEP_PARSER_PARSE_STRING_HPP_`.


---


[GitHub] incubator-quickstep pull request #328: QUICKSTEP-114 Upgrade cpplint

2017-12-21 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/328#discussion_r158370165
  
--- Diff: storage/BasicColumnStoreValueAccessor.hpp ---
@@ -108,25 +109,25 @@ class BasicColumnStoreValueAccessorHelper {
   }
 
   template 
-  inline const void* getAttributeValue(const tuple_id tuple,
+  inline const void* getAttributeValue(const tuple_id input_tuple,
--- End diff --

To be consistent with above, how about using `tid`?


---


[GitHub] incubator-quickstep pull request #327: QUICKSTEP-113 Remove glog source code...

2017-12-20 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/327


---


[GitHub] incubator-quickstep pull request #327: Remove glog source code from third pa...

2017-12-15 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/327

Remove glog source code from third party

- glog source code is now downloaded through the download script.
- Added patches for glog.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep glog-upgrade

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/327.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #327


commit 67181fda3215992b779f8c3dc7a9679ef403f80e
Author: Harshad Deshmukh 
Date:   2017-12-15T21:06:49Z

Remove glog source code from third party

- glog source code is now downloaded through the download script.
- Added patches for glog.




---


[GitHub] incubator-quickstep pull request #326: QUICKSTEP-112 Get the list of referen...

2017-12-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/326


---


[GitHub] incubator-quickstep pull request #326: QUICKSTEP-112 Get the list of referen...

2017-11-30 Thread jianqiao
Github user jianqiao commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/326#discussion_r154230379
  
--- Diff: query_optimizer/rules/ReferencedBaseRelations.hpp ---
@@ -0,0 +1,78 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_QUERY_OPTIMIZER_RULES_REFERENCED_BASE_RELATIONS_HPP_
+#define QUICKSTEP_QUERY_OPTIMIZER_RULES_REFERENCED_BASE_RELATIONS_HPP_
+
+#include 
+#include 
+
+#include "catalog/CatalogTypedefs.hpp"
+#include "query_optimizer/logical/Logical.hpp"
+#include "query_optimizer/rules/DFSTraversal.hpp"
+#include "utility/Macros.hpp"
+
+namespace quickstep {
+
+class CatalogRelation;
+
+namespace optimizer {
+
+class OptimizerContext;
+
+class ReferencedBaseRelations : public DFSTraversal {
--- End diff --

Since this class overrides the `apply` method, we can just inherit 
`Rule`.


---


[GitHub] incubator-quickstep pull request #326: QUICKSTEP-112 Get the list of referen...

2017-11-30 Thread jianqiao
Github user jianqiao commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/326#discussion_r154229622
  
--- Diff: query_optimizer/rules/ReferencedBaseRelations.hpp ---
@@ -0,0 +1,78 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_QUERY_OPTIMIZER_RULES_REFERENCED_BASE_RELATIONS_HPP_
+#define QUICKSTEP_QUERY_OPTIMIZER_RULES_REFERENCED_BASE_RELATIONS_HPP_
+
+#include 
+#include 
+
+#include "catalog/CatalogTypedefs.hpp"
+#include "query_optimizer/logical/Logical.hpp"
+#include "query_optimizer/rules/DFSTraversal.hpp"
+#include "utility/Macros.hpp"
+
+namespace quickstep {
+
+class CatalogRelation;
+
+namespace optimizer {
+
+class OptimizerContext;
+
+class ReferencedBaseRelations : public DFSTraversal {
+ public:
+  /**
+   * @brief Constructor
+   * @param optimizer_context The optimizer context.
+   */
+  explicit ReferencedBaseRelations(OptimizerContext *optimizer_context)
+  : optimizer_context_(optimizer_context) {
+  }
+
+  std::string getName() const override { return "ReferencedBaseRelations"; 
}
+
+  TreeNodePtr apply(const TreeNodePtr ) override;
+
+  /**
+   * @brief Get the base relations referenced in a query.
+   */
+  const std::vector getReferencedBaseRelations() 
const {
--- End diff --

Better remove the beginning `const`, as the method returns a temporary 
object.


---


[GitHub] incubator-quickstep pull request #300: QUICKSTEP-106: Hash-Join-Fuse: Featur...

2017-11-28 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/300


---


[GitHub] incubator-quickstep pull request #326: QUICKSTEP-112 Get the list of referen...

2017-11-28 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/326

QUICKSTEP-112 Get the list of referenced base relations

- Find the base relations that are referenced in a query.
- The referenced relations are stored in the QueryHandle.
- Separate method to just get this list of relations, without needing to 
fully optimize the query.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
get-referenced-base-relations

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/326.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #326


commit d773ee8774d5b56eec30002a7d06b3b39d885efb
Author: Harshad Deshmukh 
Date:   2017-11-28T22:16:59Z

Get the list of referenced base relations

- Find the base relations that are referenced in the query.
- The referenced relations are stored in the QueryHandle.
- Separate method to just get this list of relations, without needing to
  fully optimize the query.




---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153019903
  
--- Diff: transaction/AdmissionControl.hpp ---
@@ -0,0 +1,83 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_TRANSACTION_ADMISSION_CONTROL_HPP_
+#define QUICKSTEP_TRANSACTION_ADMISSION_CONTROL_HPP_
+
+#include "utility/Macros.hpp"
+#include "transaction/TransactionTable.hpp"
+
+namespace quickstep {
+namespace transaction {
+
+class AdmissionControl {
+ public:
+  /**
+   * @brief Constructor
+   * @param transaction_table A lookup table that stores information about
+   *all the running and waiting transactions.
+   */
+  AdmissionControl(TransactionTable *transaction_table) {}
+
+  virtual ~AdmissionControl() {}
+
+  /**
+   * @brief Admit a transaction to the system.
+   *
+   * @note Check the transaction's compatibility with the other running
+   *   transactions. If it is compatible, let it run, otherwise put
+   *   the transaction in the waiting list.
+   *
+   * @note Accesses to the transaction_table may need protection.
+   *
+   * @param tid The ID of the given transaction.
+   * @param resource_requests A vector of pairs such that each pair has a
+   *resource ID and its requested access mode.
+   * @return True if the transaction can be admitted, false if it has to 
wait.
+   */
+  virtual bool admitTransaction(const transaction_id tid,
+const std::vector> _requests) {
+return false;
+  }
+
+  /**
+   * @brief Attempt to admit a waiting transaction.
+   *
+   * @note Check the transaction's compatibility with the other running
+   *   transactions. If it is compatible, let it run, otherwise put
+   *   the transaction in the waiting list.
+   *
+   * @note Accesses to the transaction_table may need protection.
+   *
+   * @param tid The ID of the given transaction.
+   * @return True if the transaction can be admitted, false if the
+   * transaction has to wait.
+   */
+  virtual bool admitWaitingTransaction(const transaction_id tid) {
+return false;
+  }
--- End diff --

Optionally, I think it is better to mark these two APIs as `pure virtual` 
methods.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153019967
  
--- Diff: transaction/CMakeLists.txt ---
@@ -125,8 +138,8 @@ target_link_libraries(quickstep_transaction
   quickstep_transaction_ResourceId
   quickstep_transaction_StronglyConnectedComponents
   quickstep_transaction_Transaction
+  quickstep_transaction_CompatibilityChecker
   quickstep_transaction_TransactionTable)
-
--- End diff --

Revert this change.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153020128
  
--- Diff: transaction/CompatibilityChecker.hpp ---
@@ -0,0 +1,106 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_TRANSACTION_TRANSACTION_COMPATIBILITY_CHECKER_HPP_
+#define QUICKSTEP_TRANSACTION_TRANSACTION_COMPATIBILITY_CHECKER_HPP_
+
+#include 
+#include 
+
+#include "transaction/TransactionTable.hpp"
+#include "utility/Macros.hpp"
+
+namespace quickstep {
+
+class CatalogRelation;
+
+namespace transaction {
+
+/**
+ * @brief A class that checks the compatibility of a transaction with the
+ *other running transactions.
+ */
+class CompatibilityChecker {
+ public:
+  /**
+   * @brief Constructor
+   * @param transaction_table A lookup table that stores information about
+   *all the running and waiting transactions.
+   */
+  CompatibilityChecker(TransactionTable *transaction_table) {}
+
+  virtual ~CompatibilityChecker() {}
+
+  /**
+   * @brief Check if the given transaction is compatible with other
+   *running transactions.
+   * @note The transaction table has the list of all the running or pending
+   *   transactions. Lookup the table and check if the given 
transaction
+   *   is compatible, based on the CC protocol specifications.
+   * @note Accesses to the transaction_table may need protection.
+
+   * @param tid The ID of the given transaction
+   * @param resource_requests A vector of pairs such that each pair has a
+   *resource ID and its requested access mode.
+   * @return True if the transaction is compatible and false if it is not.
+   */
+  virtual bool isTranasctionCompatible(const transaction_id tid,
+   const 
std::vector> _requests) {
+return false;
+  }
+
+  /**
+   * @brief Check if the given transaction can acquire a Catalog lock on 
the
+   *given relation.
+   * @param tid The ID of the given transaction.
+   * @param relation The given relation.
+   * @param access_mode The access_mode requested to lock the catalog.
+   * @return True if the lock can be acquired, false otherwise.
+   */
+  virtual bool canAcquireCatalogLock(const transaction_id tid,
+ const CatalogRelation ,
+ const AccessMode access_mode) {
+return false;
+  }
+
+  /**
+   * @brief Check if the given transaction can acquire locks on all the 
blocks
+   *of the given relation.
+   * @param tid The ID of the given transaction.
+   * @param rid The ID of the given relation.
+   * @param blocks The list of the blocks of the given relation.
+   * @param access_mode The access_mode requested to lock the blocks.
+   * @return True if the lock can be acquired, false otherwise.
+   */
+  virtual bool canAcquireBlockLocks(const transaction_id tid,
+const relation_id rid,
+const std::vector ,
+const AccessMode access_mode) {
+return false;
+  }
--- End diff --

Optionally, mark as `pure virtual` methods.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153020184
  
--- Diff: transaction/CompatibilityChecker.hpp ---
@@ -0,0 +1,106 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_TRANSACTION_TRANSACTION_COMPATIBILITY_CHECKER_HPP_
+#define QUICKSTEP_TRANSACTION_TRANSACTION_COMPATIBILITY_CHECKER_HPP_
+
+#include 
+#include 
+
+#include "transaction/TransactionTable.hpp"
+#include "utility/Macros.hpp"
+
+namespace quickstep {
+
+class CatalogRelation;
+
+namespace transaction {
+
+/**
+ * @brief A class that checks the compatibility of a transaction with the
+ *other running transactions.
+ */
+class CompatibilityChecker {
+ public:
+  /**
+   * @brief Constructor
+   * @param transaction_table A lookup table that stores information about
+   *all the running and waiting transactions.
+   */
+  CompatibilityChecker(TransactionTable *transaction_table) {}
+
+  virtual ~CompatibilityChecker() {}
+
+  /**
+   * @brief Check if the given transaction is compatible with other
+   *running transactions.
+   * @note The transaction table has the list of all the running or pending
+   *   transactions. Lookup the table and check if the given 
transaction
+   *   is compatible, based on the CC protocol specifications.
+   * @note Accesses to the transaction_table may need protection.
+
+   * @param tid The ID of the given transaction
+   * @param resource_requests A vector of pairs such that each pair has a
+   *resource ID and its requested access mode.
+   * @return True if the transaction is compatible and false if it is not.
+   */
+  virtual bool isTranasctionCompatible(const transaction_id tid,
+   const 
std::vector> _requests) {
+return false;
+  }
+
+  /**
+   * @brief Check if the given transaction can acquire a Catalog lock on 
the
+   *given relation.
+   * @param tid The ID of the given transaction.
+   * @param relation The given relation.
+   * @param access_mode The access_mode requested to lock the catalog.
+   * @return True if the lock can be acquired, false otherwise.
+   */
+  virtual bool canAcquireCatalogLock(const transaction_id tid,
+ const CatalogRelation ,
+ const AccessMode access_mode) {
+return false;
+  }
+
+  /**
+   * @brief Check if the given transaction can acquire locks on all the 
blocks
+   *of the given relation.
+   * @param tid The ID of the given transaction.
+   * @param rid The ID of the given relation.
+   * @param blocks The list of the blocks of the given relation.
+   * @param access_mode The access_mode requested to lock the blocks.
+   * @return True if the lock can be acquired, false otherwise.
+   */
+  virtual bool canAcquireBlockLocks(const transaction_id tid,
+const relation_id rid,
+const std::vector ,
+const AccessMode access_mode) {
+return false;
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(CompatibilityChecker);
+
+};
+
+}  // namespace transaction
+}  // namespace quickstep
+
+#endif  //QUICKSTEP_TRANSACTION_TRANSACTION_COMPATIBILITY_CHECKER_HPP_
--- End diff --

Add a whitespace after `//`, and add `EOL` in the end.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153019788
  
--- Diff: transaction/AdmissionControl.hpp ---
@@ -0,0 +1,83 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_TRANSACTION_ADMISSION_CONTROL_HPP_
+#define QUICKSTEP_TRANSACTION_ADMISSION_CONTROL_HPP_
+
+#include "utility/Macros.hpp"
+#include "transaction/TransactionTable.hpp"
+
+namespace quickstep {
+namespace transaction {
+
+class AdmissionControl {
+ public:
+  /**
+   * @brief Constructor
+   * @param transaction_table A lookup table that stores information about
+   *all the running and waiting transactions.
+   */
+  AdmissionControl(TransactionTable *transaction_table) {}
--- End diff --

Add `explicit`.

I was wondering which object will own `transaction_table`. And does this 
class need to store the pointer?

Also, should this class contain the `CompatibilityChecker` object?


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153019935
  
--- Diff: transaction/CMakeLists.txt ---
@@ -50,10 +53,16 @@ 
add_library(quickstep_transaction_StronglyConnectedComponents
 add_library(quickstep_transaction_Transaction
 ../empty_src.cpp
 Transaction.hpp)
+add_library(quickstep_transaction_CompatibilityChecker
--- End diff --

Alphabet order.

Ditto below.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153019545
  
--- Diff: transaction/AdmissionControl.hpp ---
@@ -0,0 +1,83 @@
+/**
+ * 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.
+ **/
+
+#ifndef QUICKSTEP_TRANSACTION_ADMISSION_CONTROL_HPP_
+#define QUICKSTEP_TRANSACTION_ADMISSION_CONTROL_HPP_
+
+#include "utility/Macros.hpp"
+#include "transaction/TransactionTable.hpp"
--- End diff --

Alphabet order.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-24 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/325#discussion_r153019502
  
--- Diff: query_optimizer/QueryHandle.hpp ---
@@ -178,6 +178,14 @@ class QueryHandle {
 query_result_relation_ = relation;
   }
 
+  /**
+   * @brief Return all the base relations referenced in this query.
+   **/
+  std::vector getAllReferencedBaseRelations() {
--- End diff --

This should mark as a `const` method, and I think we need to add a data 
member called `referenced_base_relations_`.


---


[GitHub] incubator-quickstep pull request #325: DO NOT MERGE: Concurrent queries tran...

2017-11-23 Thread hbdeshmukh
GitHub user hbdeshmukh opened a pull request:

https://github.com/apache/incubator-quickstep/pull/325

DO NOT MERGE: Concurrent queries transactions

Hello,

This PR has some skeleton code for basic transactional queries support in 
quickstep. This PR follows the design proposed in the presentation attached 
with https://issues.apache.org/jira/browse/QUICKSTEP-107. 


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hbdeshmukh/incubator-quickstep 
concurrent-queries-transactions

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/325.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #325


commit 18692dbb6d6679aab89e503d388a5fc57889e811
Author: Harshad Deshmukh 
Date:   2017-11-16T16:27:28Z

Initial commit for APIs

- CompatabilityChecker base class in transaction checks the
  compatability of an incoming transaction with other running
  transactions.
- AdmissionControl base class decides whether to admit or waitlist an
  incoming transaction.
- QueryHandle class provides a method to list all the base relations
  referenced in a transaction.

commit 8f94489a8403c91110b454c7f93306d6c5d8fc57
Author: Harshad Deshmukh 
Date:   2017-11-20T17:02:33Z

Added more APIs to acquire locks

- Locks can be on CatalogRelation as well as individual blocks.




---


[GitHub] incubator-quickstep pull request #321: Fix number of work orders generated f...

2017-11-20 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/321


---


[GitHub] incubator-quickstep pull request #323: Temporary Build Support for OS X 10.1...

2017-11-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/323


---


[GitHub] incubator-quickstep pull request #324: Predicate locking

2017-11-10 Thread phenyl-sphinx
GitHub user phenyl-sphinx opened a pull request:

https://github.com/apache/incubator-quickstep/pull/324

Predicate locking



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/phenyl-sphinx/incubator-quickstep 
predicate-locking

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/324.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #324


commit 2d02669adfaf8cba6f8dee4a6edfa82a2a22
Author: Yuanchen Li 
Date:   2017-11-09T08:18:42Z

Temporary Build Support for OS X 10.13

commit 0fe95ae34c76b3e4b4e56505ab337774eacd52d2
Author: Yuanchen Li 
Date:   2017-11-10T19:40:49Z

predicate_classes




---


[GitHub] incubator-quickstep pull request #324: Predicate locking

2017-11-10 Thread phenyl-sphinx
Github user phenyl-sphinx closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/324


---


[GitHub] incubator-quickstep pull request #323: Temporary Build Support for OS X 10.1...

2017-11-09 Thread phenyl-sphinx
Github user phenyl-sphinx commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/323#discussion_r150144494
  
--- Diff: CMakeLists.txt ---
@@ -302,11 +302,11 @@ else()
 endif()
   endif()
 
-  # OSX 10.12 has deprecated certain system-level APIs which causes 
protobuf & glog
+  # OSX 10.12+ has deprecated certain system-level APIs which causes 
protobuf & glog
   # builds to fail. As a short-term workaround for now, we turn off 
deprecated
   # warnings so that they do not cause build failures anymore.
   # TODO: Remove this workaround by fixing the protobuf_cmake and 
glog_cmake.
-  if (${CMAKE_SYSTEM} MATCHES "Darwin-16.[0-9]*.[0-9]*")
+  if (${CMAKE_SYSTEM} MATCHES "Darwin-1[6-7]*.[0-9]*.[0-9]*")
--- End diff --

No. But either should be able to work.


---


[GitHub] incubator-quickstep pull request #323: Temporary Build Support for OS X 10.1...

2017-11-09 Thread zuyu
Github user zuyu commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/323#discussion_r150140641
  
--- Diff: CMakeLists.txt ---
@@ -302,11 +302,11 @@ else()
 endif()
   endif()
 
-  # OSX 10.12 has deprecated certain system-level APIs which causes 
protobuf & glog
+  # OSX 10.12+ has deprecated certain system-level APIs which causes 
protobuf & glog
   # builds to fail. As a short-term workaround for now, we turn off 
deprecated
   # warnings so that they do not cause build failures anymore.
   # TODO: Remove this workaround by fixing the protobuf_cmake and 
glog_cmake.
-  if (${CMAKE_SYSTEM} MATCHES "Darwin-16.[0-9]*.[0-9]*")
+  if (${CMAKE_SYSTEM} MATCHES "Darwin-1[6-7]*.[0-9]*.[0-9]*")
--- End diff --

Just curious if you have tried `Darwin-1[67].[0-9]*.[0-9]*`? Thanks!


---


[GitHub] incubator-quickstep pull request #323: Temporary Build Support for OS X 10.1...

2017-11-09 Thread phenyl-sphinx
GitHub user phenyl-sphinx opened a pull request:

https://github.com/apache/incubator-quickstep/pull/323

Temporary Build Support for OS X 10.13

Added building support for OS X 10.13 (which didn't work beforehand)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/phenyl-sphinx/incubator-quickstep master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/323.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #323


commit 2d02669adfaf8cba6f8dee4a6edfa82a2a22
Author: Yuanchen Li 
Date:   2017-11-09T08:18:42Z

Temporary Build Support for OS X 10.13




---


  1   2   3   4   5   6   7   8   9   10   >