Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 0f2960c

Browse files
authored
Merge branch 'master' into catalog_update
2 parents a12b284 + 308a669 commit 0f2960c

File tree

137 files changed

+4337
-1210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+4337
-1210
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ script:
8787
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then python ../script/testing/junit/run_junit.py; fi
8888
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 python ../script/testing/junit/run_junit.py; fi
8989
# upload coverage info
90-
- if [[ $TRAVIS_OS_NAME == 'On' ]]; then make coveralls; fi
90+
- if [[ $COVERALLS == 'On' ]]; then make coveralls; fi

script/installation/packages.sh

Lines changed: 24 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
## g++ manually.
1313
##
1414
## Supported environments:
15-
## * Ubuntu (14.04, 16.04)
16-
## * Fedora
17-
## * OSX
15+
## * Ubuntu (14.04, 16.04, 18.04)
16+
## * macOS
17+
##
18+
## Update (2018-06-08):
19+
## We are no longer able to support RedHat/Fedora because those
20+
## environments are not supported by TensorFlow.
1821
## =================================================================
1922

2023
set -o errexit
@@ -44,6 +47,9 @@ TF_TYPE="cpu"
4447
function install_protobuf3.4.0() {
4548
# Install Relevant tooling
4649
# Remove any old versions of protobuf
50+
# Note: Protobuf 3.5+ PPA available Ubuntu Bionic(18.04) onwards - Should be used
51+
# when we retire 16.04 too: https://launchpad.net/~maarten-fonville/+archive/ubuntu/protobuf
52+
# This PPA unfortunately doesnt have Protobuf 3.5 for 16.04, but does for 14.04/18.04+
4753
DISTRIB=$1 # ubuntu/fedora
4854
if [ "$DISTRIB" == "ubuntu" ]; then
4955
sudo apt-get --yes --force-yes remove --purge libprotobuf-dev protobuf-compiler
@@ -60,7 +66,7 @@ function install_protobuf3.4.0() {
6066
wget -O protobuf-cpp-3.4.0.tar.gz https://github.com/google/protobuf/releases/download/v3.4.0/protobuf-cpp-3.4.0.tar.gz
6167
tar -xzf protobuf-cpp-3.4.0.tar.gz
6268
cd protobuf-3.4.0
63-
./autogen.sh && ./configure && make -j4 && sudo make install && sudo ldconfig
69+
./autogen.sh && ./configure && make -j4 && sudo make install && sudo ldconfig || exit 1
6470
cd ..
6571
# Cleanup
6672
rm -rf protobuf-3.4.0 protobuf-cpp-3.4.0.tar.gz
@@ -106,6 +112,10 @@ if [ "$DISTRO" = "UBUNTU" ]; then
106112
LLVM_PKG_URL="http://apt.llvm.org/artful/"
107113
LLVM_PKG_TARGET="llvm-toolchain-artful main"
108114
fi
115+
if [ "$MAJOR_VER" == "18" ]; then
116+
LLVM_PKG_URL="http://apt.llvm.org/bionic/"
117+
LLVM_PKG_TARGET="llvm-toolchain-bionic main"
118+
fi
109119

110120
if ! grep -q "deb $LLVM_PKG_URL $LLVM_PKG_TARGET" /etc/apt/sources.list; then
111121
echo -e "\n# Added by Peloton 'packages.sh' script on $(date)\ndeb $LLVM_PKG_URL $LLVM_PKG_TARGET" | sudo tee -a /etc/apt/sources.list > /dev/null
@@ -138,6 +148,12 @@ if [ "$DISTRO" = "UBUNTU" ]; then
138148
PKG_CLANG="clang-3.8"
139149
TF_VERSION="1.5.0"
140150
fi
151+
# Fix for llvm on Ubuntu 18.x
152+
if [ "$MAJOR_VER" == "18" ]; then
153+
PKG_LLVM="llvm-3.9"
154+
PKG_CLANG="clang-3.9"
155+
TF_VERSION="1.5.0"
156+
fi
141157
TFCApiFile="libtensorflow-${TF_TYPE}-linux-x86_64-${TF_VERSION}.tar.gz"
142158
LinkerConfigCmd="sudo ldconfig"
143159
sudo apt-get -q $FORCE_Y --ignore-missing -y install \
@@ -170,159 +186,15 @@ if [ "$DISTRO" = "UBUNTU" ]; then
170186
g++ \
171187
libeigen3-dev \
172188
ant \
173-
unzip
189+
unzip \
190+
zlib1g-dev
174191
# Install version of protobuf needed by C-API
175192
install_protobuf3.4.0 "ubuntu"
176193
# Install tensorflow
177194
install_tf "$TFCApiFile" "$TF_VERSION" "$LinkerConfigCmd"
178195

179196
## ------------------------------------------------
180-
## DEBIAN
181-
## ------------------------------------------------
182-
elif [ "$DISTRO" = "DEBIAN OS" ]; then
183-
sudo apt-get -q --ignore-missing -y install \
184-
git \
185-
g++ \
186-
clang \
187-
cmake \
188-
libgflags-dev \
189-
libprotobuf-dev \
190-
protobuf-compiler \
191-
bison \
192-
flex \
193-
libevent-dev \
194-
libboost-dev \
195-
libboost-thread-dev \
196-
libboost-filesystem-dev \
197-
libjemalloc-dev \
198-
libssl-dev \
199-
valgrind \
200-
lcov \
201-
libpqxx-dev \
202-
llvm-dev \
203-
libedit-dev \
204-
postgresql-client \
205-
libtbb-dev \
206-
libeigen3-dev
207-
208-
## ------------------------------------------------
209-
## FEDORA
210-
## ------------------------------------------------
211-
elif [[ "$DISTRO" == *"FEDORA"* ]]; then
212-
case $DISTRO_VER in
213-
26) LLVM="llvm";;
214-
*) LLVM="llvm4.0";;
215-
esac
216-
TF_VERSION="1.5.0"
217-
TFCApiFile="libtensorflow-${TF_TYPE}-linux-x86_64-${TF_VERSION}.tar.gz"
218-
LinkerConfigCmd="sudo ldconfig"
219-
sudo dnf -q install -y \
220-
git \
221-
gcc-c++ \
222-
make \
223-
cmake \
224-
gflags-devel \
225-
bison \
226-
flex \
227-
libevent-devel \
228-
openssl-devel \
229-
boost-devel \
230-
jemalloc-devel \
231-
valgrind \
232-
lcov \
233-
libpqxx-devel \
234-
libpqxx \
235-
${LLVM} \
236-
${LLVM}-devel \
237-
${LLVM}-static \
238-
libedit-devel \
239-
postgresql \
240-
libasan \
241-
libtsan \
242-
libubsan \
243-
libatomic \
244-
tbb-devel \
245-
python3-pip \
246-
curl \
247-
autoconf \
248-
automake \
249-
libtool
250-
# Install version of protobuf needed by C-API
251-
install_protobuf3.4.0 "fedora"
252-
# Install tensorflow
253-
install_tf "$TFCApiFile" "$TF_VERSION" "$LinkerConfigCmd"
254-
255-
## ------------------------------------------------
256-
## REDHAT
257-
## ------------------------------------------------
258-
elif [[ "$DISTRO" == *"REDHAT"* ]] && [[ "${DISTRO_VER%.*}" == "7" ]]; then
259-
function install_package() {
260-
if [ "$#" -lt 1 ]; then
261-
echo "The download path is required."
262-
exit 1
263-
fi
264-
265-
pushd $TMPDIR
266-
wget -nc --no-check-certificate "$1"
267-
tpath=$(basename "$1")
268-
dpath=$(tar --exclude='*/*' -tf "$tpath")
269-
tar xzf $tpath
270-
pushd $dpath
271-
if [ -e "bootstrap.sh" ]; then
272-
./bootstrap.sh
273-
sudo ./b2 install
274-
else
275-
./configure
276-
make
277-
sudo make install
278-
fi
279-
popd; popd
280-
return 0
281-
}
282-
283-
#Package download paths
284-
PKGS=(
285-
"https://github.com/schuhschuh/gflags/archive/v2.0.tar.gz"
286-
)
287-
#Add EPEL repository first
288-
sudo yum -q -y install epel-release
289-
sudo yum -q -y upgrade epel-release
290-
291-
#Simple installations via yum
292-
sudo yum -q -y install \
293-
git \
294-
gcc-c++ \
295-
make \
296-
cmake3 \
297-
flex \
298-
bison \
299-
libevent-devel \
300-
openssl-devel \
301-
boost-devel \
302-
protobuf-devel \
303-
jemalloc-devel \
304-
libedit-devel \
305-
valgrind \
306-
lcov \
307-
m4 \
308-
doxygen \
309-
graphviz \
310-
libpqxx \
311-
libpqxx-devel \
312-
llvm3.9 \
313-
llvm3.9-static \
314-
llvm3.9-devel \
315-
postgresql \
316-
libtbb-dev
317-
318-
# Manually download some packages to guarantee
319-
# version compatibility
320-
for pkg_path in ${PKGS[@]}; do
321-
install_package $pkg_path
322-
done
323-
324-
## ------------------------------------------------
325-
## DARWIN (OSX)
197+
## DARWIN (macOS)
326198
## ------------------------------------------------
327199
elif [ "$DISTRO" = "DARWIN" ]; then
328200
set +o errexit
@@ -362,7 +234,7 @@ elif [ "$DISTRO" = "DARWIN" ]; then
362234
## UNKNOWN
363235
## ------------------------------------------------
364236
else
365-
echo "Unknown distribution '$DISTRO'"
237+
echo "Unsupported distribution '$DISTRO'"
366238
echo "Please contact our support team for additional help." \
367239
"Be sure to include the contents of this message"
368240
echo "Platform: $(uname -a)"

script/validators/source_validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
"src/network/protocol.cpp",
5959
"src/include/common/macros.h",
6060
"src/common/stack_trace.cpp",
61-
"src/include/parser/sql_scanner.h", # There is a free() in comments
6261
"src/include/index/bloom_filter.h",
6362
"src/include/index/compact_ints_key.h",
6463
"src/include/index/bwtree.h",
6564
"src/codegen/util/oa_hash_table.cpp",
66-
"src/codegen/util/cc_hash_table.cpp"
65+
"src/codegen/util/cc_hash_table.cpp",
66+
"src/codegen/codegen.cpp", # We allow calling printf() from codegen for debugging
6767
]
6868

6969
## ==============================================

src/binder/bind_node_visitor.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,19 @@ void BindNodeVisitor::Visit(parser::DeleteStatement *node) {
166166
}
167167

168168
void BindNodeVisitor::Visit(parser::LimitDescription *) {}
169-
void BindNodeVisitor::Visit(parser::CopyStatement *) {}
169+
170+
void BindNodeVisitor::Visit(parser::CopyStatement *node) {
171+
context_ = std::make_shared<BinderContext>(nullptr);
172+
if (node->table != nullptr) {
173+
node->table->Accept(this);
174+
175+
// If the table is given, we're either writing or reading all columns
176+
context_->GenerateAllColumnExpressions(node->select_list);
177+
} else {
178+
node->select_stmt->Accept(this);
179+
}
180+
}
181+
170182
void BindNodeVisitor::Visit(parser::CreateFunctionStatement *) {}
171183
void BindNodeVisitor::Visit(parser::CreateStatement *node) {
172184
node->TryBindDatabaseName(default_database_name_);

src/catalog/abstract_catalog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "executor/plan_executor.h"
3636
#include "executor/seq_scan_executor.h"
3737
#include "executor/update_executor.h"
38+
#include "expression/constant_value_expression.h"
3839

3940
#include "storage/database.h"
4041
#include "storage/storage_manager.h"

0 commit comments

Comments
 (0)