hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [46/51] [abbrv] [partial] incubator-hawq git commit: HAWQ-735. Import thrift-0.9.3 into depends/thirdparty/thrift folder
Date Wed, 18 May 2016 02:50:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/cmake/ThriftMacros.cmake
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/cmake/ThriftMacros.cmake b/depends/thirdparty/thrift/build/cmake/ThriftMacros.cmake
new file mode 100644
index 0000000..2656598
--- /dev/null
+++ b/depends/thirdparty/thrift/build/cmake/ThriftMacros.cmake
@@ -0,0 +1,94 @@
+#
+# 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.
+#
+
+
+set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
+
+
+macro(ADD_LIBRARY_THRIFT name)
+
+if(WITH_SHARED_LIB)
+    add_library(${name} SHARED ${ARGN})
+    #target_link_libraries(${name} ${SYSLIBS})
+    set_target_properties(${name} PROPERTIES
+        OUTPUT_NAME ${name}
+        VERSION ${thrift_VERSION}
+        SOVERSION ${thrift_VERSION} )
+    #set_target_properties(${name} PROPERTIES PUBLIC_HEADER "${thriftcpp_HEADERS}")
+    install(TARGETS ${name}
+        RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
+        LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
+        ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
+        PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
+endif()
+
+if(WITH_STATIC_LIB)
+    add_library(${name}_static STATIC ${ARGN})
+    #target_link_libraries(${name}_static ${SYSLIBS})
+    set_target_properties(${name}_static PROPERTIES
+        OUTPUT_NAME ${name}${STATIC_POSTFIX}
+        VERSION ${thrift_VERSION}
+        SOVERSION ${thrift_VERSION} )
+    install(TARGETS ${name}_static
+        RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
+        LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
+        ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
+        PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
+endif()
+
+endmacro(ADD_LIBRARY_THRIFT)
+
+
+macro(TARGET_LINK_LIBRARIES_THRIFT name)
+
+if(WITH_SHARED_LIB)
+    target_link_libraries(${name} ${ARGN})
+endif()
+
+if(WITH_STATIC_LIB)
+    target_link_libraries(${name}_static ${ARGN})
+endif()
+
+endmacro(TARGET_LINK_LIBRARIES_THRIFT)
+
+
+macro(LINK_AGAINST_THRIFT_LIBRARY target libname)
+
+if (WITH_SHARED_LIB)
+    target_link_libraries(${target} ${libname})
+elseif (WITH_STATIC_LIB)
+    target_link_libraries(${target} ${libname}_static)
+else()
+    message(FATAL "Not linking with shared or static libraries?")
+endif()
+
+endmacro(LINK_AGAINST_THRIFT_LIBRARY)
+
+
+macro(TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY target libname)
+
+if(WITH_SHARED_LIB)
+    target_link_libraries(${target} ${libname})
+endif()
+
+if(WITH_STATIC_LIB)
+    target_link_libraries(${target}_static ${libname}_static)
+endif()
+
+endmacro(TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/cmake/config.h.in
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/cmake/config.h.in b/depends/thirdparty/thrift/build/cmake/config.h.in
new file mode 100644
index 0000000..181ea18
--- /dev/null
+++ b/depends/thirdparty/thrift/build/cmake/config.h.in
@@ -0,0 +1,157 @@
+/*
+ * 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.
+ */
+
+/* config.h generated by CMake from config.h.in */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+
+/* Name of package */
+#cmakedefine PACKAGE "${PACKAGE}"
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}"
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME "${PACKAGE_NAME}"
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME "${PACKAGE_TARNAME}"
+
+/* Define to the home page for this package. */
+#cmakedefine PACKAGE_URL "${PACKAGE_URL}"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "${PACKAGE_VERSION}"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "${PACKAGE_STRING}"
+
+/* Version number of package */
+#define VERSION "${VERSION}"
+
+/************************** DEFINES *************************/
+
+/* Define if the AI_ADDRCONFIG symbol is unavailable */
+#cmakedefine AI_ADDRCONFIG 0
+
+/* Possible value for SIGNED_RIGHT_SHIFT_IS */
+/* TODO: This is just set to 1 for the moment
+   port the macro aclocal/ax_signed_right_shift.m4 to CMake to make this work */
+#define ARITHMETIC_RIGHT_SHIFT 1
+
+/* Indicates the effect of the right shift operator on negative signed
+   integers */
+/* TODO: This is just set to 1 for the moment */
+#define SIGNED_RIGHT_SHIFT_IS 1
+
+/* Use *.h extension for parser header file */
+/* TODO: This might now be necessary anymore as it is set only for automake < 1.11
+   see: aclocal/ac_prog_bison.m4 */
+#cmakedefine BISON_USE_PARSER_H_EXTENSION 1
+
+/* replaces POSIX pthread by boost::thread */
+#cmakedefine USE_BOOST_THREAD 1
+
+/* replaces POSIX pthread by std::thread */
+#cmakedefine USE_STD_THREAD 1
+
+/* Define to 1 if strerror_r returns char *. */
+#cmakedefine STRERROR_R_CHAR_P 1
+
+
+/************************** HEADER FILES *************************/
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#cmakedefine HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#cmakedefine HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#cmakedefine HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#cmakedefine HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#cmakedefine HAVE_PTHREAD_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#cmakedefine HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#cmakedefine HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#cmakedefine HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#cmakedefine HAVE_SYS_POLL_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#cmakedefine HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sched.h> header file. */
+#cmakedefine HAVE_SCHED_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/*************************** FUNCTIONS ***************************/
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#cmakedefine HAVE_GETHOSTBYNAME 1
+
+/* Define to 1 if you have the `gethostbyname_r' function. */
+#cmakedefine HAVE_GETHOSTBYNAME_R 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#cmakedefine HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the `sched_get_priority_max' function. */
+#cmakedefine HAVE_SCHED_GET_PRIORITY_MAX 1
+
+/* Define to 1 if you have the `sched_get_priority_min' function. */
+#cmakedefine HAVE_SCHED_GET_PRIORITY_MIN 1
+
+
+/* Define to 1 if strerror_r returns char *. */
+#cmakedefine STRERROR_R_CHAR_P 1
+
+#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/cmake/mingw32-toolchain.cmake
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/cmake/mingw32-toolchain.cmake b/depends/thirdparty/thrift/build/cmake/mingw32-toolchain.cmake
new file mode 100644
index 0000000..864c0eb
--- /dev/null
+++ b/depends/thirdparty/thrift/build/cmake/mingw32-toolchain.cmake
@@ -0,0 +1,24 @@
+# CMake mingw32 cross compile toolchain file
+
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
+SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
+SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+set(BUILD_SHARED_LIBS OFF)
+SET(CMAKE_EXE_LINKER_FLAGS "-static")
+set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-static-libgcc")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-static-libstdc++")

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/docker/README.md
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/docker/README.md b/depends/thirdparty/thrift/build/docker/README.md
new file mode 100644
index 0000000..3712653
--- /dev/null
+++ b/depends/thirdparty/thrift/build/docker/README.md
@@ -0,0 +1,27 @@
+# Apache Thrift Docker containers
+A set of docker containers used to build and test Apache Thrift
+
+### Available Containers
+
+* Ubuntu - based on ubuntu:trusty (14.04)
+* Centos - based on centos:6.6
+
+## Dependencies
+
+* A working Docker environment. A Vagrantfile is provided which will setup an Ubuntu host and working Docker environment as well as build the Apache Thrift Docker container for testing and development
+
+## Usage
+From the Apache Thrift code base root
+
+* Build
+
+	docker build -t thrift build/docker/ubuntu
+
+	or
+
+	docker build -t thrift build/docker/centos
+
+* Run
+
+	docker run -v $(pwd):/thrift -it thrift /bin/bash
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/docker/Vagrantfile
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/docker/Vagrantfile b/depends/thirdparty/thrift/build/docker/Vagrantfile
new file mode 100644
index 0000000..5eac6e6
--- /dev/null
+++ b/depends/thirdparty/thrift/build/docker/Vagrantfile
@@ -0,0 +1,59 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Base system bootstrap script
+$bootstrap_script = <<__BOOTSTRAP__
+echo "Provisioning defaults"
+
+sudo apt-get update -y
+sudo apt-get upgrade -y
+
+# Install default packages
+sudo apt-get install -y build-essential curl git
+
+# Install latest Docker version
+sudo curl -sSL https://get.docker.io/gpg | sudo apt-key add -
+sudo echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
+sudo apt-get update -y
+sudo apt-get install -y linux-image-extra-`uname -r` aufs-tools
+sudo apt-get install -y lxc-docker
+
+echo "Finished provisioning defaults"
+__BOOTSTRAP__
+
+Vagrant.configure("2") do |config|
+  config.vm.box = "trusty64"
+  config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
+  config.ssh.forward_agent = true
+
+  config.vm.provider :virtualbox do |vbox|
+    vbox.customize ["modifyvm", :id, "--memory", "1024"]
+    vbox.customize ["modifyvm", :id, "--cpus", "2"]
+  end
+
+  # Setup the default bootstrap script for our ubuntu base box image
+  config.vm.provision "shell", inline: $bootstrap_script
+
+  # Setup the custom docker image from our Ubuntu Dockerfile
+  config.vm.provision "docker" do |d|
+    d.build_image "/vagrant/ubuntu", args: "-t thrift"
+  end
+
+  # Setup the custom docker image from our Centos Dockerfile
+  #config.vm.provision "docker" do |d|
+  #  d.build_image "/vagrant/centos", args: "-t thrift-centos"
+  #end
+
+end

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/docker/centos/Dockerfile
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/docker/centos/Dockerfile b/depends/thirdparty/thrift/build/docker/centos/Dockerfile
new file mode 100644
index 0000000..c4c273c
--- /dev/null
+++ b/depends/thirdparty/thrift/build/docker/centos/Dockerfile
@@ -0,0 +1,96 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Apache Thrift Docker build environment for Centos
+#
+# Known missing client libraries:
+#  - D
+#  - Haxe
+#  - Lua
+#
+
+FROM centos:7
+MAINTAINER Apache Thrift <dev@thrift.apache.org>
+
+ENV HOME /root
+
+# RUN yum -y update
+
+# General dependencies
+RUN yum -y install -y tar m4 perl gcc git libtool zlib-devel openssl-devel autoconf make bison bison-devel flex
+
+RUN mkdir -p /tmp/epel && \
+    curl -sSL "http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm" -o /tmp/epel/epel-release-7-5.noarch.rpm && \
+    cd /tmp/epel && \
+    rpm -ivh epel-release*.rpm && \
+    cd $HOME
+
+# Automake
+RUN mkdir -p /tmp/automake && \
+    curl -SL "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz" | tar -xzC /tmp/automake && \
+    cd /tmp/automake/automake-1.14 && \
+    ./configure --prefix=/usr && \
+    make && \
+    make install && \
+    cd $HOME
+
+# C++ dependencies
+RUN yum install -y libboost-dev libevent-devel
+
+# Java Dependencies
+RUN yum install -y ant junit ant-nodeps ant-junit java-1.7.0-openjdk-devel
+
+# Python Dependencies
+RUN yum install -y python-devel python-setuptools python-twisted
+
+# Ruby Dependencies
+RUN yum install -y ruby ruby-devel rubygems && \
+    gem install bundler rake
+
+# Perl Dependencies
+RUN yum install -y perl-Bit-Vector perl-Class-Accessor perl-ExtUtils-MakeMaker perl-Test-Simple
+
+# PHP Dependencies
+RUN yum install -y php php-devel php-pear re2c
+
+# GLibC Dependencies
+RUN yum install -y glib2-devel
+
+# Erlang Dependencies
+RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
+    yum install -y erlang-kernel erlang-erts erlang-stdlib erlang-eunit erlang-rebar
+
+# Go Dependencies
+RUN curl -sSL https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -C /usr/lib/ -xz && \
+    mkdir -p /usr/share/go
+
+ENV GOROOT /usr/lib/go
+ENV GOPATH /usr/share/go
+ENV PATH ${GOROOT}/bin:${GOPATH}/bin:$PATH
+
+# Haskell Dependencies
+RUN yum -y install cabal-dev && \
+    cabal update && \
+    cabal install cabal-install && \
+    cd $HOME
+
+# Node.js Dependencies
+RUN yum install -y nodejs nodejs-devel npm
+
+# C# Dependencies
+RUN yum install -y mono-core mono-devel mono-web-devel mono-extras mingw32-binutils mingw32-runtime mingw32-nsis
+
+# Clean up
+RUN rm -rf /tmp/* && \
+    yum clean all
+
+WORKDIR $HOME

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/docker/ubuntu/Dockerfile
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/docker/ubuntu/Dockerfile b/depends/thirdparty/thrift/build/docker/ubuntu/Dockerfile
new file mode 100644
index 0000000..0148006
--- /dev/null
+++ b/depends/thirdparty/thrift/build/docker/ubuntu/Dockerfile
@@ -0,0 +1,111 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Apache Thrift Docker build environment for Centos
+#
+# Known missing client libraries:
+#  - None
+
+FROM ubuntu:trusty
+MAINTAINER Apache Thrift <dev@thrift.apache.org>
+
+ENV HOME /root
+ENV DEBIAN_FRONTEND noninteractive
+
+RUN apt-get update -y && apt-get dist-upgrade -y
+
+# General dependencies
+RUN apt-get install -y automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev git \
+    debhelper cmake
+
+# C++ dependencies
+RUN apt-get install -y libboost-dev libboost-test-dev libboost-program-options-dev \
+    libboost-filesystem-dev libboost-system-dev libboost-thread-dev libevent-dev
+
+# Java dependencies
+RUN apt-get install -y ant openjdk-7-jdk maven && \
+    update-java-alternatives -s java-1.7.0-openjdk-amd64
+
+# Python dependencies
+RUN apt-get install -y python-all python-all-dev python-all-dbg python-setuptools python-support \
+    python-twisted python-zope.interface
+
+# Ruby dependencies
+RUN apt-get install -y ruby ruby-dev && \
+    gem install bundler rake
+
+# Perl dependencies
+RUN apt-get install -y libbit-vector-perl libclass-accessor-class-perl
+
+# Php dependencies
+RUN apt-get install -y php5 php5-dev php5-cli php-pear re2c phpunit
+
+# GlibC dependencies
+RUN apt-get install -y libglib2.0-dev
+
+# Erlang dependencies
+RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \
+    curl -sSL http://packages.erlang-solutions.com/debian/erlang_solutions.asc | sudo apt-key add - && \
+    apt-get update && \
+    apt-get install -y erlang-base erlang-eunit erlang-dev
+
+# GO dependencies
+RUN curl -sSL https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -C /usr/lib/ -xz && \
+    mkdir -p /usr/share/go
+
+ENV GOROOT /usr/lib/go
+ENV GOPATH /usr/share/go
+ENV PATH ${GOROOT}/bin:${GOPATH}/bin:$PATH
+
+# Haskell dependencies
+RUN apt-get install -y ghc cabal-install libghc-binary-dev libghc-network-dev libghc-http-dev \
+    libghc-hashable-dev libghc-unordered-containers-dev libghc-vector-dev && \
+    cabal update
+
+# Haxe
+RUN apt-get install -y neko neko-dev libneko0 && \
+    mkdir -p /tmp/haxe /usr/lib/haxe && \
+    curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz -o /tmp/haxe/haxe-3.2.0-linux64.tar.gz && \
+    tar -xvzf /tmp/haxe/haxe-3.2.0-linux64.tar.gz -C /usr/lib/haxe --strip-components=1 && \
+    ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
+    ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
+    mkdir -p /usr/lib/haxe/lib  && \
+    chmod -R 777 /usr/lib/haxe/lib && \
+    haxelib setup /usr/lib/haxe/lib && \
+    haxelib install hxcpp
+
+# Lua dependencies
+RUN apt-get install -y lua5.2 lua5.2-dev
+
+# Node.js dependencies
+RUN apt-get install -y nodejs nodejs-dev nodejs-legacy npm
+
+# CSharp
+RUN apt-get install -y mono-gmcs mono-devel mono-xbuild mono-complete libmono-system-web2.0-cil \
+    mingw32 mingw32-binutils mingw32-runtime nsis
+
+# D dependencies
+# THRIFT-2916: DMD pinned to 2.065.0-0 due to regression in 2.066
+# THRIFT-3253: DMD pinned to 2.065.0-0 due to deprecations 2.067.1
+RUN apt-get install -y gcc-multilib xdg-utils && \
+    curl -sSL http://downloads.dlang.org/releases/2.x/2.065.0/dmd_2.065.0-0_amd64.deb -o /tmp/dmd_2.065.0-0_amd64.deb && \
+    dpkg -i /tmp/dmd_2.065.0-0_amd64.deb && \
+    rm /tmp/dmd_2.065.0-0_amd64.deb
+
+# Clean up
+RUN apt-get clean && \
+    rm -rf /var/cache/apt/* && \
+    rm -rf /var/lib/apt/lists/* && \
+    rm -rf /tmp/* && \
+    rm -rf /var/tmp/*
+
+WORKDIR $HOME

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/travis/installCXXDependencies.sh
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/travis/installCXXDependencies.sh b/depends/thirdparty/thrift/build/travis/installCXXDependencies.sh
new file mode 100755
index 0000000..ac3edf3
--- /dev/null
+++ b/depends/thirdparty/thrift/build/travis/installCXXDependencies.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# 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.
+
+
+# Mainly aiming Travis CI's Ubuntu machines for now
+# see what we need: http://thrift.apache.org/docs/install/ubuntu
+
+# General dependencies
+sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted" -y
+sudo apt-get update -qq
+
+sudo apt-get install -qq libpango-1.0-0 libqt4-dev qtbase5-dev qtbase5-dev-tools qt5-default libboost-dev libboost-test-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev make cmake git debhelper bc nsis ninja-build
+dpkg -S /usr/include/boost/version.hpp

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/build/travis/installDependencies.sh
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/build/travis/installDependencies.sh b/depends/thirdparty/thrift/build/travis/installDependencies.sh
new file mode 100755
index 0000000..5b74140
--- /dev/null
+++ b/depends/thirdparty/thrift/build/travis/installDependencies.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# 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.
+
+SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
+
+# Mainly aiming Travis CI's Ubuntu machines for now
+# see what we need: http://thrift.apache.org/docs/install/ubuntu
+
+# General dependencies
+sh ${SCRIPTPATH}/installCXXDependencies.sh
+
+# Java dependencies
+sudo apt-get install -qq ant openjdk-7-jdk
+sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
+
+# Python dependencies
+sudo apt-get install -qq python-all python-all-dev python-all-dbg python-setuptools python-support python-twisted
+
+# Ruby dependencies
+sudo apt-get install -qq ruby ruby-dev
+sudo gem install bundler rake
+
+# Perl dependencies
+sudo apt-get install -qq libbit-vector-perl libclass-accessor-class-perl libio-socket-ssl-perl libnet-ssleay-perl libcrypt-ssleay-perl
+
+# Php dependencies
+sudo apt-get install -qq php5 php5-dev php5-cli php-pear re2c
+
+# GlibC dependencies
+sudo apt-get install -qq libglib2.0-dev
+
+# Erlang dependencies
+sudo apt-get install -qq erlang-base erlang-eunit erlang-dev
+
+# GO dependencies
+echo "golang-go golang-go/dashboard boolean false" | debconf-set-selections
+sudo apt-get -y install -qq golang golang-go
+
+# Haskell dependencies
+sudo add-apt-repository -y ppa:hvr/ghc
+sudo apt-get update
+sudo apt-get install cabal-install-1.20 ghc-$GHCVER
+
+# Lua dependencies
+sudo apt-get install -qq lua5.2 lua5.2-dev
+
+# Node.js dependencies
+sudo apt-get install -qq nodejs nodejs-dev npm
+sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
+
+# CSharp
+sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil
+sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime nsis

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/cleanup.sh
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/cleanup.sh b/depends/thirdparty/thrift/cleanup.sh
new file mode 100755
index 0000000..f110721
--- /dev/null
+++ b/depends/thirdparty/thrift/cleanup.sh
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+#
+# 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.
+#
+
+topsrcdir="`dirname $0`"
+cd "$topsrcdir"
+
+make -k clean >/dev/null 2>&1
+make -k distclean >/dev/null 2>&1
+find . -name Makefile.in -exec rm -f {} \;
+rm -rf \
+AUTHORS \
+ChangeLog \
+INSTALL \
+Makefile \
+Makefile.in \
+Makefile.orig \
+aclocal/libtool.m4 \
+aclocal/ltoptions.m4 \
+aclocal/ltsugar.m4 \
+aclocal/ltversion.m4 \
+aclocal/lt~obsolete.m4 \
+aclocal.m4 \
+autom4te.cache \
+autoscan.log \
+config.guess \
+config.h \
+config.hin \
+config.hin~ \
+config.log \
+config.status \
+config.status.lineno \
+config.sub \
+configure \
+configure.lineno \
+configure.scan \
+depcomp \
+.deps \
+install-sh \
+.libs \
+libtool \
+ltmain.sh \
+missing \
+ylwrap \
+if/gen-* \
+test/gen-* \
+lib/php/src/ext/thrift_protocol/.deps \
+lib/php/src/ext/thrift_protocol/Makefile \
+lib/php/src/ext/thrift_protocol/Makefile.fragments \
+lib/php/src/ext/thrift_protocol/Makefile.global \
+lib/php/src/ext/thrift_protocol/Makefile.objects \
+lib/php/src/ext/thrift_protocol/acinclude.m4 \
+lib/php/src/ext/thrift_protocol/aclocal.m4 \
+lib/php/src/ext/thrift_protocol/autom4te.cache \
+lib/php/src/ext/thrift_protocol/build \
+lib/php/src/ext/thrift_protocol/config.guess \
+lib/php/src/ext/thrift_protocol/config.h \
+lib/php/src/ext/thrift_protocol/config.h.in \
+lib/php/src/ext/thrift_protocol/config.log \
+lib/php/src/ext/thrift_protocol/config.nice \
+lib/php/src/ext/thrift_protocol/config.status \
+lib/php/src/ext/thrift_protocol/config.sub \
+lib/php/src/ext/thrift_protocol/configure \
+lib/php/src/ext/thrift_protocol/configure.in \
+lib/php/src/ext/thrift_protocol/include \
+lib/php/src/ext/thrift_protocol/install-sh \
+lib/php/src/ext/thrift_protocol/libtool \
+lib/php/src/ext/thrift_protocol/ltmain.sh \
+lib/php/src/ext/thrift_protocol/missing \
+lib/php/src/ext/thrift_protocol/mkinstalldirs \
+lib/php/src/ext/thrift_protocol/modules \
+lib/php/src/ext/thrift_protocol/run-tests.php

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/CMakeLists.txt b/depends/thirdparty/thrift/compiler/cpp/CMakeLists.txt
new file mode 100644
index 0000000..bc6591c
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/CMakeLists.txt
@@ -0,0 +1,133 @@
+#
+# 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.
+#
+
+# Windows has a different header
+if(MSVC)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/windows/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+else()
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+endif()
+
+find_package(FLEX REQUIRED)
+find_package(BISON REQUIRED)
+
+# Create flex and bison files and build the lib parse static library
+BISON_TARGET(thrifty ${CMAKE_CURRENT_SOURCE_DIR}/src/thrifty.yy ${CMAKE_CURRENT_BINARY_DIR}/thrifty.cc)
+FLEX_TARGET(thriftl ${CMAKE_CURRENT_SOURCE_DIR}/src/thriftl.ll ${CMAKE_CURRENT_BINARY_DIR}/thriftl.cc)
+ADD_FLEX_BISON_DEPENDENCY(thriftl thrifty)
+
+# HACK: Work around the fact that bison crates a .hh file but we need a .h file
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/thrifty.h
+                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/thrifty.hh ${CMAKE_CURRENT_BINARY_DIR}/thrifty.h
+                   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/thrifty.hh
+                   )
+
+set(libparse_SOURCES
+    ${CMAKE_CURRENT_BINARY_DIR}/thrifty.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/thriftl.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/thrifty.h
+)
+
+add_library(libparse STATIC ${libparse_SOURCES})
+
+# Create the thrift compiler
+set( thrift_SOURCES 
+    src/main.cc
+    src/md5.c
+    src/generate/t_generator.cc
+    src/generate/t_generator_registry.h
+    src/globals.h
+    src/main.h
+    src/platform.h
+    src/md5.h
+    src/audit/t_audit.cpp
+    src/parse/t_doc.h
+    src/parse/t_type.h
+    src/parse/t_base_type.h
+    src/parse/t_enum.h
+    src/parse/t_enum_value.h
+    src/parse/t_typedef.h
+    src/parse/t_typedef.cc
+    src/parse/t_container.h
+    src/parse/t_list.h
+    src/parse/t_set.h
+    src/parse/t_map.h
+    src/parse/t_struct.h
+    src/parse/t_field.h
+    src/parse/t_service.h
+    src/parse/t_function.h
+    src/parse/t_program.h
+    src/parse/t_scope.h
+    src/parse/t_const.h
+    src/parse/t_const_value.h
+    src/parse/parse.cc
+    src/generate/t_generator.h
+    src/generate/t_oop_generator.h
+    src/generate/t_html_generator.h
+    src/windows/config.h
+    version.h
+)
+
+# This macro adds an option THRIFT_COMPILER_${NAME}
+# that allows enabling or disabling certain languages
+macro(THRIFT_ADD_COMPILER name description initial)
+    string(TOUPPER "THRIFT_COMPILER_${name}" enabler)
+    set(src "src/generate/t_${name}_generator.cc")
+    option(${enabler} ${description} ${initial})
+    if(${enabler})
+        list(APPEND thrift_SOURCES ${src})
+    endif()
+endmacro()
+
+# The following compiler can be enabled or disabled
+THRIFT_ADD_COMPILER(c_glib  "Enable compiler for C with Glib" ON)
+THRIFT_ADD_COMPILER(cpp     "Enable compiler for C++" ON)
+THRIFT_ADD_COMPILER(java    "Enable compiler for Java"   ON)
+THRIFT_ADD_COMPILER(as3     "Enable compiler for ActionScript 3" ON)
+THRIFT_ADD_COMPILER(haxe    "Enable compiler for Haxe" ON)
+THRIFT_ADD_COMPILER(csharp  "Enable compiler for C#" ON)
+THRIFT_ADD_COMPILER(py      "Enable compiler for Python 2.0" ON)
+THRIFT_ADD_COMPILER(rb      "Enable compiler for Ruby" ON)
+THRIFT_ADD_COMPILER(perl    "Enable compiler for Perl" ON)
+THRIFT_ADD_COMPILER(php     "Enable compiler for PHP" ON)
+THRIFT_ADD_COMPILER(erl     "Enable compiler for Erlang" ON)
+THRIFT_ADD_COMPILER(cocoa   "Enable compiler for Cocoa Objective-C" ON)
+THRIFT_ADD_COMPILER(st      "Enable compiler for Smalltalk" ON)
+THRIFT_ADD_COMPILER(ocaml   "Enable compiler for OCaml" ON)
+THRIFT_ADD_COMPILER(hs      "Enable compiler for Haskell" ON)
+THRIFT_ADD_COMPILER(xsd     "Enable compiler for XSD" ON)
+THRIFT_ADD_COMPILER(html    "Enable compiler for HTML Documentation" ON)
+THRIFT_ADD_COMPILER(js      "Enable compiler for JavaScript" ON)
+THRIFT_ADD_COMPILER(json    "Enable compiler for JSON" ON)
+THRIFT_ADD_COMPILER(javame  "Enable compiler for Java ME" ON)
+THRIFT_ADD_COMPILER(delphi  "Enable compiler for Delphi" ON)
+THRIFT_ADD_COMPILER(go      "Enable compiler for Go" ON)
+THRIFT_ADD_COMPILER(d       "Enable compiler for D" ON)
+THRIFT_ADD_COMPILER(lua     "Enable compiler for Lua" ON)
+
+# Thrift is looking for include files in the src directory
+# we also add the current binary directory for generated files
+include_directories(${CMAKE_CURRENT_BINARY_DIR} src)
+
+add_executable(thrift-compiler ${thrift_SOURCES})
+set_target_properties(thrift-compiler PROPERTIES OUTPUT_NAME thrift)
+
+target_link_libraries(thrift-compiler libparse)
+
+install(TARGETS thrift-compiler DESTINATION "${BIN_INSTALL_DIR}")

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/Makefile.am
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/Makefile.am b/depends/thirdparty/thrift/compiler/cpp/Makefile.am
new file mode 100644
index 0000000..38f9f9d
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/Makefile.am
@@ -0,0 +1,125 @@
+#
+# 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.
+#
+#
+# Contains some contributions under the Thrift Software License.
+# Please see doc/old-thrift-license.txt in the Thrift distribution for
+# details.
+
+AM_YFLAGS = -d
+LIBS =
+BUILT_SOURCES = src/thrifty.cc
+
+bin_PROGRAMS = thrift
+
+noinst_LIBRARIES = libparse.a
+
+thrift_OBJDIR = obj
+
+thrift_SOURCES = src/main.cc \
+                 src/md5.c \
+                 src/generate/t_generator.cc \
+                 src/generate/t_generator_registry.h \
+                 src/globals.h \
+                 src/main.h \
+                 src/platform.h \
+                 src/logging.h \
+                 src/md5.h \
+                 src/audit/t_audit.cpp \
+                 src/audit/t_audit.h \
+                 src/parse/t_doc.h \
+                 src/parse/t_type.h \
+                 src/parse/t_base_type.h \
+                 src/parse/t_enum.h \
+                 src/parse/t_enum_value.h \
+                 src/parse/t_typedef.h \
+                 src/parse/t_typedef.cc \
+                 src/parse/t_container.h \
+                 src/parse/t_list.h \
+                 src/parse/t_set.h \
+                 src/parse/t_map.h \
+                 src/parse/t_struct.h \
+                 src/parse/t_field.h \
+                 src/parse/t_service.h \
+                 src/parse/t_function.h \
+                 src/parse/t_program.h \
+                 src/parse/t_scope.h \
+                 src/parse/t_const.h \
+                 src/parse/t_const_value.h \
+                 src/parse/parse.cc \
+                 src/generate/t_generator.h \
+                 src/generate/t_oop_generator.h \
+                 src/generate/t_html_generator.h \
+                 src/windows/config.h \
+                 src/windows/version.h
+
+# Specific client generator source
+thrift_SOURCES += src/generate/t_c_glib_generator.cc \
+                  src/generate/t_cpp_generator.cc \
+                  src/generate/t_java_generator.cc \
+                  src/generate/t_json_generator.cc \
+                  src/generate/t_as3_generator.cc \
+                  src/generate/t_haxe_generator.cc \
+                  src/generate/t_csharp_generator.cc \
+                  src/generate/t_py_generator.cc \
+                  src/generate/t_rb_generator.cc \
+                  src/generate/t_perl_generator.cc \
+                  src/generate/t_php_generator.cc \
+                  src/generate/t_erl_generator.cc \
+                  src/generate/t_cocoa_generator.cc \
+                  src/generate/t_st_generator.cc \
+                  src/generate/t_ocaml_generator.cc \
+                  src/generate/t_hs_generator.cc \
+                  src/generate/t_xsd_generator.cc \
+                  src/generate/t_html_generator.cc \
+                  src/generate/t_js_generator.cc \
+                  src/generate/t_javame_generator.cc \
+                  src/generate/t_delphi_generator.cc \
+                  src/generate/t_go_generator.cc \
+                  src/generate/t_gv_generator.cc \
+                  src/generate/t_d_generator.cc \
+                  src/generate/t_lua_generator.cc
+
+thrift_CPPFLAGS = -I$(srcdir)/src
+thrift_CXXFLAGS = -Wall -Wextra -pedantic
+thrift_LDADD = @LEXLIB@ libparse.a
+
+libparse_a_CPPFLAGS = -I$(srcdir)/src
+libparse_a_CXXFLAGS = -Wall -Wno-sign-compare -Wno-unused
+
+libparse_a_SOURCES = src/thrifty.yy \
+                     src/thriftl.ll
+
+WINDOWS_DIST = \
+             compiler.sln \
+             compiler.vcxproj \
+             compiler.vcxproj.filters
+
+EXTRA_DIST = \
+             coding_standards.md \
+             README.md \
+             CMakeLists.txt \
+             $(WINDOWS_DIST)
+
+clean-local:
+	$(RM) thriftl.cc thrifty.cc thrifty.h thrifty.hh version.h windows/version.h
+
+src/main.cc: version.h
+
+style-local:
+	$(CPPSTYLE_CMD)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/README.md
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/README.md b/depends/thirdparty/thrift/compiler/cpp/README.md
new file mode 100644
index 0000000..ea195c7
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/README.md
@@ -0,0 +1,84 @@
+# Build compiler using CMake
+
+Use the following steps to build using cmake:
+
+    mkdir cmake-build
+    cd cmake-build
+    cmake ..
+    make
+
+
+### Create an eclipse project
+
+    mkdir cmake-ec && cd cmake-ec
+    cmake -G "Eclipse CDT4 - Unix Makefiles" ..
+    make
+
+Now open the folder cmake-ec using eclipse.
+
+
+### Cross compile using mingw32 and generate a Windows Installer with CPack
+
+    mkdir cmake-mingw32 && cd cmake-mingw32
+    cmake -DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ..
+    cpack
+
+## Build on windows
+
+### using Git Bash
+Git Bash provides flex and bison, so you just need to do this:
+
+    mkdir cmake-vs && cd cmake-vs
+    cmake -DWITH_SHARED_LIB=off ..
+
+### using Win flex-bison
+
+In order to build on windows with winflexbison a few additional steps are necessary:
+
+1. Download winflexbison from http://sourceforge.net/projects/winflexbison/
+2. Extract the winflex bison files to for e.g. C:\winflexbison
+3. Make the CMake variables point to the correct binaries.
+  * FLEX_EXECUTABLE = C:/winbuild/win_flex.exe
+  * BISON_EXECUTABLE = C:/winbuild/win_bison.exe
+4. Generate a Visual Studio project:
+```
+mkdir cmake-vs && cd cmake-vs
+cmake -G "Visual Studio 12" -DWITH_SHARED_LIB=off ..
+```
+5. Now open the folder build_vs using Visual Studio 2013.
+
+# Building the Thrift IDL compiler in Windows
+
+If you don't want to use CMake you can use the already available Visual Studio
+2010 solution.
+The Visual Studio project contains pre-build commands to generate the
+thriftl.cc, thrifty.cc and thrifty.hh files which are necessary to build
+the compiler. These depend on bison, flex and their dependencies to
+work properly. If this doesn't work on a system, try these manual
+pre-build steps.
+
+Open compiler.sln and remove the Pre-build commands under the project's
+ Properties -> Build Events -> Pre-Build Events.
+
+Download flex & bison from http://jaisantonyk.wordpress.com/2008/03/16/lex-and-yaccbison-in-windows/
+Download bison.simple in addition to bison.exe . This build of bison is easier to use
+than the one on sourceforge which has a myriad of dependencies.
+Place these binaries somewhere in the path.
+
+From a command prompt:
+> cd thrift/compiler/cpp
+> flex -osrc\thriftl.cc src\thriftl.ll
+In the generated thriftl.cc, comment out #include <unistd.h>
+
+Place a copy of bison.simple in thrift/compiler/cpp
+> bison -y -o "src/thrifty.cc" --defines src/thrifty.yy
+> move src\thrifty.cc.hh  src\thrifty.hh
+
+Bison might generate the yacc header file "thrifty.cc.h" with just one h ".h" extension; in this case you'll have to rename to "thrifty.h".
+
+> move src\windows\version.h.in src\windows\version.h
+
+Download inttypes.h from the interwebs and place it in an include path
+location (e.g. thrift/compiler/cpp/src).
+
+Build the compiler in Visual Studio.

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/coding_standards.md
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/coding_standards.md b/depends/thirdparty/thrift/compiler/cpp/coding_standards.md
new file mode 100644
index 0000000..ea08946
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/coding_standards.md
@@ -0,0 +1,4 @@
+## Compiler Coding Standards
+
+ * When making small change / bugfix - follow style as seen in nearby code.
+ * When making major refactor and / or adding new feature - follow style for C++ library
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/compiler.sln
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/compiler.sln b/depends/thirdparty/thrift/compiler/cpp/compiler.sln
new file mode 100644
index 0000000..94961aa
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/compiler.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compiler", "compiler.vcxproj", "{89975A1A-F799-4556-98B8-64E30AB39A90}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{89975A1A-F799-4556-98B8-64E30AB39A90}.Debug|Win32.ActiveCfg = Debug|Win32
+		{89975A1A-F799-4556-98B8-64E30AB39A90}.Debug|Win32.Build.0 = Debug|Win32
+		{89975A1A-F799-4556-98B8-64E30AB39A90}.Release|Win32.ActiveCfg = Release|Win32
+		{89975A1A-F799-4556-98B8-64E30AB39A90}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj b/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj
new file mode 100644
index 0000000..c08edf2
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="src\audit\t_audit.h" />
+    <ClInclude Include="src\generate\t_generator.h" />
+    <ClInclude Include="src\generate\t_generator_registry.h" />
+    <ClInclude Include="src\generate\t_oop_generator.h" />
+    <ClInclude Include="src\generate\t_html_generator.h" />
+    <ClInclude Include="src\globals.h" />
+    <ClInclude Include="src\main.h" />
+    <ClInclude Include="src\md5.h" />
+    <ClInclude Include="src\parse\t_base_type.h" />
+    <ClInclude Include="src\parse\t_const.h" />
+    <ClInclude Include="src\parse\t_const_value.h" />
+    <ClInclude Include="src\parse\t_container.h" />
+    <ClInclude Include="src\parse\t_doc.h" />
+    <ClInclude Include="src\parse\t_enum.h" />
+    <ClInclude Include="src\parse\t_enum_value.h" />
+    <ClInclude Include="src\parse\t_field.h" />
+    <ClInclude Include="src\parse\t_function.h" />
+    <ClInclude Include="src\parse\t_list.h" />
+    <ClInclude Include="src\parse\t_map.h" />
+    <ClInclude Include="src\parse\t_program.h" />
+    <ClInclude Include="src\parse\t_scope.h" />
+    <ClInclude Include="src\parse\t_service.h" />
+    <ClInclude Include="src\parse\t_set.h" />
+    <ClInclude Include="src\parse\t_struct.h" />
+    <ClInclude Include="src\parse\t_type.h" />
+    <ClInclude Include="src\parse\t_typedef.h" />
+    <ClInclude Include="src\platform.h" />
+    <ClInclude Include="src\thrifty.hh" />
+    <ClInclude Include="src\windows\config.h" />
+    <ClInclude Include="src\windows\version.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="src\audit\t_audit.cpp"/>
+    <ClCompile Include="src\generate\t_as3_generator.cc" />
+    <ClCompile Include="src\generate\t_cocoa_generator.cc" />
+    <ClCompile Include="src\generate\t_cpp_generator.cc" />
+    <ClCompile Include="src\generate\t_csharp_generator.cc" />
+    <ClCompile Include="src\generate\t_c_glib_generator.cc" />
+    <ClCompile Include="src\generate\t_d_generator.cc" />
+    <ClCompile Include="src\generate\t_delphi_generator.cc" />
+    <ClCompile Include="src\generate\t_erl_generator.cc" />
+    <ClCompile Include="src\generate\t_generator.cc" />
+    <ClCompile Include="src\generate\t_go_generator.cc" />
+    <ClCompile Include="src\generate\t_gv_generator.cc" />
+    <ClCompile Include="src\generate\t_haxe_generator.cc" />
+    <ClCompile Include="src\generate\t_hs_generator.cc" />
+    <ClCompile Include="src\generate\t_html_generator.cc" />
+    <ClCompile Include="src\generate\t_javame_generator.cc" />
+    <ClCompile Include="src\generate\t_java_generator.cc" />
+    <ClCompile Include="src\generate\t_js_generator.cc" />
+    <ClCompile Include="src\generate\t_json_generator.cc" />
+    <ClCompile Include="src\generate\t_lua_generator.cc" />
+    <ClCompile Include="src\generate\t_ocaml_generator.cc" />
+    <ClCompile Include="src\generate\t_perl_generator.cc" />
+    <ClCompile Include="src\generate\t_php_generator.cc" />
+    <ClCompile Include="src\generate\t_py_generator.cc" />
+    <ClCompile Include="src\generate\t_rb_generator.cc" />
+    <ClCompile Include="src\generate\t_st_generator.cc" />
+    <ClCompile Include="src\generate\t_xsd_generator.cc" />
+    <ClCompile Include="src\main.cc" />
+    <ClCompile Include="src\md5.c" />
+    <ClCompile Include="src\parse\parse.cc" />
+    <ClCompile Include="src\parse\t_typedef.cc" />
+    <ClCompile Include="src\thriftl.cc" />
+    <ClCompile Include="src\thrifty.cc" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="src\thriftl.ll" />
+    <None Include="src\thrifty.yy" />
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{89975A1A-F799-4556-98B8-64E30AB39A90}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>compiler</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <TargetName>thrift</TargetName>
+    <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <TargetName>thrift</TargetName>
+    <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <TargetName>thrift</TargetName>
+    <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>$(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath)</IncludePath>
+    <TargetName>thrift</TargetName>
+    <ExecutablePath>$(ExecutablePath);C:\Program Files (x86)\Git\bin</ExecutablePath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;MINGW;YY_NO_UNISTD_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ForcedIncludeFiles>config.h</ForcedIncludeFiles>
+      <CompileAs>CompileAsCpp</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+    <PreBuildEvent>
+      <Command>flex -o "src\\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;MINGW;YY_NO_UNISTD_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ForcedIncludeFiles>config.h</ForcedIncludeFiles>
+      <CompileAs>CompileAsCpp</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+    <PreBuildEvent>
+      <Command>flex -o "src\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;MINGW;YY_NO_UNISTD_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ForcedIncludeFiles>config.h</ForcedIncludeFiles>
+      <CompileAs>CompileAsCpp</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+    <PreBuildEvent>
+      <Command>flex -o "src\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;MINGW;YY_NO_UNISTD_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ForcedIncludeFiles>config.h</ForcedIncludeFiles>
+      <CompileAs>CompileAsCpp</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+    <PreBuildEvent>
+      <Command>flex -o "src\thriftl.cc" src/thriftl.ll
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj.filters
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj.filters b/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj.filters
new file mode 100644
index 0000000..7ff69b7
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/compiler.vcxproj.filters
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClInclude Include="src\audit\t_audit.h" />
+    <ClInclude Include="src\generate\t_generator.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\generate\t_generator_registry.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\generate\t_oop_generator.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\generate\t_html_generator.h">
+      <Filter>generate</Filter>
+    </ClInclude>
+    <ClInclude Include="src\globals.h" />
+    <ClInclude Include="src\main.h" />
+    <ClInclude Include="src\md5.h" />
+    <ClInclude Include="src\parse\t_base_type.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_const.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_const_value.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_container.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_doc.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_enum.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_enum_value.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_field.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_function.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_list.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_map.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_program.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_scope.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_service.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_set.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_struct.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_type.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\parse\t_typedef.h">
+      <Filter>parse</Filter>
+    </ClInclude>
+    <ClInclude Include="src\platform.h" />
+    <ClInclude Include="src\thrifty.hh" />
+    <ClInclude Include="src\windows\config.h">
+      <Filter>windows</Filter>
+    </ClInclude>
+    <ClInclude Include="src\windows\version.h">
+      <Filter>windows</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <Filter Include="windows">
+      <UniqueIdentifier>{ae9d0a15-57ae-4f01-87a4-81f790249b83}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="parse">
+      <UniqueIdentifier>{5df016bb-591b-420a-a535-4330d9187fbf}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="generate">
+      <UniqueIdentifier>{b5c626af-afa5-433c-8e10-ee734533cb68}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="src\audit\t_audit.cpp"/>
+    <ClCompile Include="src\generate\t_as3_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_cocoa_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_cpp_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_csharp_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_c_glib_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_d_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_delphi_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_erl_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_go_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_gv_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_haxe_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_hs_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_html_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_javame_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_java_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_js_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_ocaml_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_perl_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_php_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_py_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_rb_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_st_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_xsd_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\main.cc" />
+    <ClCompile Include="src\md5.c" />
+    <ClCompile Include="src\parse\parse.cc">
+      <Filter>parse</Filter>
+    </ClCompile>
+    <ClCompile Include="src\thriftl.cc" />
+    <ClCompile Include="src\thrifty.cc" />
+    <ClCompile Include="src\parse\t_typedef.cc">
+      <Filter>parse</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_json_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+    <ClCompile Include="src\generate\t_lua_generator.cc">
+      <Filter>generate</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="src\thriftl.ll" />
+    <None Include="src\thrifty.yy" />
+  </ItemGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.cpp
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.cpp b/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.cpp
new file mode 100644
index 0000000..afcbd5e
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.cpp
@@ -0,0 +1,466 @@
+
+#include <cassert>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <time.h>
+#include <string>
+#include <algorithm>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <limits.h>
+
+// Careful: must include globals first for extern definitions
+#include "globals.h"
+
+#include "parse/t_program.h"
+#include "parse/t_scope.h"
+#include "parse/t_const.h"
+#include "parse/t_field.h"
+
+#include "version.h"
+
+#include "t_audit.h"
+
+extern int g_warn;
+extern std::string g_curpath;
+extern bool g_return_failure;
+
+void thrift_audit_warning(int level, const char* fmt, ...) {
+   if (g_warn < level) {
+      return;
+   }
+   va_list args;
+   printf("[Thrift Audit Warning:%s] ", g_curpath.c_str());
+   va_start(args, fmt);
+   vprintf(fmt, args);
+   va_end(args);
+   printf("\n");
+}
+
+void thrift_audit_failure(const char* fmt, ...) {
+  va_list args;
+  fprintf(stderr, "[Thrift Audit Failure:%s] ", g_curpath.c_str());
+  va_start(args, fmt);
+  vfprintf(stderr, fmt, args);
+  va_end(args);
+  fprintf(stderr, "\n");
+  g_return_failure = true;
+}
+
+void compare_namespace(t_program* newProgram, t_program* oldProgram)
+{
+   const std::map<std::string, std::string>& newNamespaceMap = newProgram->get_all_namespaces();
+   const std::map<std::string, std::string>& oldNamespaceMap = oldProgram->get_all_namespaces();
+
+   for(std::map<std::string, std::string>::const_iterator oldNamespaceMapIt = oldNamespaceMap.begin();
+         oldNamespaceMapIt != oldNamespaceMap.end();
+         oldNamespaceMapIt++)
+   {
+      std::map<std::string, std::string>::const_iterator newNamespaceMapIt = newNamespaceMap.find(oldNamespaceMapIt->first);
+      if(newNamespaceMapIt == newNamespaceMap.end())
+      {
+         thrift_audit_warning(1, "Language %s not found in new thrift file\n", (oldNamespaceMapIt->first).c_str());
+      }
+      else if((newNamespaceMapIt->second) != oldNamespaceMapIt->second)
+      {
+         thrift_audit_warning(1, "Namespace %s changed in new thrift file\n", (oldNamespaceMapIt->second).c_str());
+      }
+   }
+}
+
+void compare_enum_values(t_enum* newEnum,t_enum* oldEnum)
+{
+   const std::vector<t_enum_value*>& oldEnumValues = oldEnum->get_constants();
+   for(std::vector<t_enum_value*>::const_iterator oldEnumValuesIt = oldEnumValues.begin();
+         oldEnumValuesIt != oldEnumValues.end();
+         oldEnumValuesIt++)
+   {
+      int enumValue = (*oldEnumValuesIt)->get_value();
+      t_enum_value* newEnumValue = newEnum->get_constant_by_value(enumValue);
+      if(newEnumValue != NULL)
+      {
+         std::string enumName = (*oldEnumValuesIt)->get_name();
+         if(enumName != newEnumValue->get_name())
+         {
+            thrift_audit_warning(1, "Name of the value %d changed in enum %s\n", enumValue, oldEnum->get_name().c_str());
+         }      
+      }
+      else
+      {
+         thrift_audit_failure("Enum value %d missing in %s\n", enumValue, oldEnum->get_name().c_str());
+      }
+
+   }
+}
+
+void compare_enums(const std::vector<t_enum*>& newEnumList, const std::vector<t_enum*>& oldEnumList)
+{
+   std::map<std::string,t_enum*> newEnumMap;
+   std::vector<t_enum*>::const_iterator newEnumIt;
+   for(newEnumIt = newEnumList.begin(); newEnumIt != newEnumList.end(); newEnumIt++)
+   {
+      newEnumMap[(*newEnumIt)->get_name()] = *newEnumIt;
+   }
+   std::vector<t_enum*>::const_iterator oldEnumIt;
+   for(oldEnumIt = oldEnumList.begin(); oldEnumIt != oldEnumList.end(); oldEnumIt++)
+   {
+      std::map<std::string,t_enum*>::iterator newEnumMapIt;
+      newEnumMapIt = newEnumMap.find((*oldEnumIt)->get_name());
+
+      if(newEnumMapIt == newEnumMap.end())
+      {
+         thrift_audit_warning(1, "Enum %s not found in new thrift file\n",(*oldEnumIt)->get_name().c_str());
+      }
+      else
+      {
+         compare_enum_values(newEnumMapIt->second, *oldEnumIt);
+      }
+   }
+}
+
+//This function returns 'true' if the two arguements are of same types.
+//Returns false if they are of different type
+bool compare_type(t_type* newType, t_type* oldType)
+{
+   //Comparing names of two types will work when the newType and oldType are basic types or structs or enums.
+   //However, when they are containers, get_name() returns empty for which we have to compare the type of 
+   //their elements as well.
+   if((newType->get_name()).empty() && (oldType->get_name()).empty())
+   {
+
+      if(newType->is_list() && oldType->is_list())
+      {
+         t_type* newElementType = ((t_list*)newType)->get_elem_type();
+         t_type* oldElementType = ((t_list*)oldType)->get_elem_type();
+         return compare_type(newElementType, oldElementType);
+      }
+      else if(newType->is_map() && oldType->is_map())
+      {
+         t_type* newKeyType = ((t_map*)newType)->get_key_type();
+         t_type* oldKeyType = ((t_map*)oldType)->get_key_type();
+
+         t_type* newValType = ((t_map*)newType)->get_val_type();
+         t_type* oldValType = ((t_map*)oldType)->get_val_type();
+
+         return (compare_type(newKeyType, oldKeyType) && compare_type(newValType, oldValType));
+      }
+      else if(newType->is_set() && oldType->is_set())
+      {
+         t_type* newElementType = ((t_set*)newType)->get_elem_type();
+         t_type* oldElementType = ((t_set*)oldType)->get_elem_type();
+         return compare_type(newElementType, oldElementType); 
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else if(newType->get_name() == oldType->get_name())
+   {
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+bool compare_pair(std::pair<t_const_value*, t_const_value*> newMapPair, std::pair<t_const_value*, t_const_value*> oldMapPair)
+{
+   return compare_defaults(newMapPair.first, oldMapPair.first) && compare_defaults(newMapPair.second, oldMapPair.second);
+}   
+
+// This function returns 'true' if the default values are same. Returns false if they are different.
+bool compare_defaults(t_const_value* newStructDefault, t_const_value* oldStructDefault)
+{
+   if(newStructDefault == NULL && oldStructDefault == NULL) return true;
+   else if(newStructDefault == NULL && oldStructDefault != NULL) return false;
+   else if (newStructDefault != NULL && oldStructDefault == NULL) return false;
+
+   if(newStructDefault->get_type() != oldStructDefault->get_type())
+   {
+      return false;
+   }
+
+   switch(newStructDefault->get_type())
+   {
+      case t_const_value::CV_INTEGER:
+         return (newStructDefault->get_integer() == oldStructDefault->get_integer());
+      case t_const_value::CV_DOUBLE:
+         return (newStructDefault->get_double() == oldStructDefault->get_double());
+      case t_const_value::CV_STRING:
+         return (newStructDefault->get_string() == oldStructDefault->get_string());
+      case t_const_value::CV_LIST:
+         {
+            const std::vector<t_const_value*>& oldDefaultList = oldStructDefault->get_list();
+            const std::vector<t_const_value*>& newDefaultList = newStructDefault->get_list();
+            bool defaultValuesCompare = (oldDefaultList.size() == newDefaultList.size());
+
+            return defaultValuesCompare && std::equal(newDefaultList.begin(), newDefaultList.end(), oldDefaultList.begin(), compare_defaults);
+         }
+      case t_const_value::CV_MAP:
+         {
+            const std::map<t_const_value*, t_const_value*> newMap = newStructDefault->get_map();
+            const std::map<t_const_value*, t_const_value*> oldMap = oldStructDefault->get_map();
+
+            bool defaultValuesCompare = (oldMap.size() == newMap.size());
+
+            return defaultValuesCompare && std::equal(newMap.begin(), newMap.end(), oldMap.begin(), compare_pair);
+         }
+      case t_const_value::CV_IDENTIFIER:
+         return (newStructDefault->get_identifier() == oldStructDefault->get_identifier());
+      default:
+         return false;
+   }
+
+}
+
+void compare_struct_field(t_field* newField, t_field* oldField, std::string oldStructName)
+{
+   t_type* newFieldType = newField->get_type();
+   t_type* oldFieldType = oldField->get_type();
+   if(!compare_type(newFieldType, oldFieldType))
+   {
+      thrift_audit_failure("Struct Field Type Changed for Id = %d in %s \n", newField->get_key(), oldStructName.c_str());
+   }
+
+   // A Struct member can be optional if it is mentioned explicitly, or if it is assigned with default values.
+   bool newStructFieldOptional = (newField->get_req() != t_field::T_REQUIRED);
+   bool oldStructFieldOptional = (oldField->get_req() != t_field::T_REQUIRED);
+
+   if(newStructFieldOptional != oldStructFieldOptional)
+   {
+      thrift_audit_failure("Struct Field Requiredness Changed for Id = %d in %s \n", newField->get_key(), oldStructName.c_str());
+   }
+   if(newStructFieldOptional || oldStructFieldOptional)
+   {
+      if(!compare_defaults(newField->get_value(), oldField->get_value()))
+      {
+         thrift_audit_warning(1, "Default value changed for Id = %d in %s \n", newField->get_key(), oldStructName.c_str());
+      }
+   }
+
+   std::string fieldName = newField->get_name();
+   if(fieldName != oldField->get_name())
+   {
+      thrift_audit_warning(1, "Struct field name changed for Id = %d in %s\n", newField->get_key(), oldStructName.c_str());
+   }
+
+}
+
+void compare_single_struct(t_struct* newStruct, t_struct* oldStruct, const std::string& oldStructName = std::string())
+{
+   std::string structName = oldStructName.empty() ? oldStruct->get_name() : oldStructName;
+   const std::vector<t_field*>& oldStructMembersInIdOrder = oldStruct->get_sorted_members();
+   const std::vector<t_field*>& newStructMembersInIdOrder = newStruct->get_sorted_members();
+   std::vector<t_field*>::const_iterator oldStructMemberIt = oldStructMembersInIdOrder.begin();
+   std::vector<t_field*>::const_iterator newStructMemberIt = newStructMembersInIdOrder.begin();
+
+   // Since we have the struct members in their ID order, comparing their IDs can be done by traversing the two member
+   // lists together.  
+   while(!(oldStructMemberIt == oldStructMembersInIdOrder.end() && newStructMemberIt == newStructMembersInIdOrder.end()))
+   {
+      if(newStructMemberIt == newStructMembersInIdOrder.end() && oldStructMemberIt != oldStructMembersInIdOrder.end())
+      {
+         // A field ID has been removed from the end.
+         thrift_audit_failure("Struct Field removed for Id = %d in %s \n", (*oldStructMemberIt)->get_key(), structName.c_str());
+         oldStructMemberIt++;
+      }
+      else if(newStructMemberIt != newStructMembersInIdOrder.end() && oldStructMemberIt == oldStructMembersInIdOrder.end())
+      {
+         //New field ID has been added to the end.
+         if((*newStructMemberIt)->get_req() == t_field::T_REQUIRED)
+         {
+            thrift_audit_failure("Required Struct Field Added for Id = %d in %s \n", (*newStructMemberIt)->get_key(), structName.c_str());
+         }
+         newStructMemberIt++;
+      }
+      else if((*newStructMemberIt)->get_key() == (*oldStructMemberIt)->get_key())
+      {
+         //Field ID found in both structs. Compare field types, default values.
+         compare_struct_field(*newStructMemberIt, *oldStructMemberIt, structName);
+
+         newStructMemberIt++;
+         oldStructMemberIt++;
+      }
+      else if((*newStructMemberIt)->get_key() < (*oldStructMemberIt)->get_key())
+      {
+         //New Field Id is inserted in between
+         //Adding fields to struct is fine, but adding them in the middle is suspicious. Error!!
+         thrift_audit_failure("Struct field is added in the middle with Id = %d in %s\n",  (*newStructMemberIt)->get_key(),  structName.c_str());
+         newStructMemberIt++;
+      }
+      else if((*newStructMemberIt)->get_key() > (*oldStructMemberIt)->get_key())
+      {
+         //A field is deleted in newStruct.
+         thrift_audit_failure("Struct Field removed for Id = %d in %s \n",  (*oldStructMemberIt)->get_key(), structName.c_str());
+         oldStructMemberIt++;
+      }
+
+   }
+}
+
+void compare_structs(const std::vector<t_struct*>& newStructList, const std::vector<t_struct*>& oldStructList)
+{
+   std::map<std::string,t_struct*> newStructMap;
+   std::vector<t_struct*>::const_iterator newStructListIt;
+   for(newStructListIt = newStructList.begin(); newStructListIt != newStructList.end(); newStructListIt++)
+   {
+      newStructMap[(*newStructListIt)->get_name()] = *newStructListIt;
+   }
+
+   std::vector<t_struct*>::const_iterator oldStructListIt;
+   for(oldStructListIt = oldStructList.begin(); oldStructListIt != oldStructList.end(); oldStructListIt++)
+   {
+      std::map<std::string, t_struct*>::iterator newStructMapIt;
+      newStructMapIt = newStructMap.find((*oldStructListIt)->get_name());
+      if(newStructMapIt == newStructMap.end())
+      {
+         thrift_audit_failure("Struct %s not found in new thrift file\n", (*oldStructListIt)->get_name().c_str());
+      }
+      else
+      {
+         compare_single_struct(newStructMapIt->second, *oldStructListIt);
+      }
+   }
+
+}
+
+void compare_single_function(t_function* newFunction, t_function* oldFunction)
+{
+   t_type* newFunctionReturnType = newFunction->get_returntype();
+
+   if(newFunction->is_oneway() != oldFunction->is_oneway())
+   {
+      thrift_audit_failure("Oneway attribute changed for function %s\n",oldFunction->get_name().c_str());
+   }
+   if(!compare_type(newFunctionReturnType, oldFunction->get_returntype()))
+   {
+      thrift_audit_failure("Return type changed for function %s\n",oldFunction->get_name().c_str());
+   }
+
+   //Compare function arguments.
+   compare_single_struct(newFunction->get_arglist(), oldFunction->get_arglist());
+   std::string exceptionName = oldFunction->get_name();
+   exceptionName += "_exception";
+   compare_single_struct(newFunction->get_xceptions(), oldFunction->get_xceptions(), exceptionName);
+}
+
+void compare_functions(const std::vector<t_function*>& newFunctionList, const std::vector<t_function*>& oldFunctionList)
+{
+   std::map<std::string, t_function*> newFunctionMap;
+   std::map<std::string, t_function*>::iterator newFunctionMapIt;
+   for(std::vector<t_function*>::const_iterator newFunctionIt = newFunctionList.begin();
+         newFunctionIt != newFunctionList.end();
+         newFunctionIt++)
+   {
+      newFunctionMap[(*newFunctionIt)->get_name()] = *newFunctionIt;
+   }
+
+   for(std::vector<t_function*>::const_iterator oldFunctionIt = oldFunctionList.begin();
+         oldFunctionIt != oldFunctionList.end();
+         oldFunctionIt++)
+   {
+      newFunctionMapIt = newFunctionMap.find((*oldFunctionIt)->get_name());
+      if(newFunctionMapIt == newFunctionMap.end())
+      {
+         thrift_audit_failure("New Thrift File has missing function %s\n",(*oldFunctionIt)->get_name().c_str());
+         continue;
+      }
+      else
+      {
+         //Function is found in both thrift files. Compare return type and argument list
+         compare_single_function(newFunctionMapIt->second, *oldFunctionIt);
+      }
+   }
+
+}
+
+void compare_services(const std::vector<t_service*>& newServices, const std::vector<t_service*>& oldServices)
+{
+   std::vector<t_service*>::const_iterator oldServiceIt;
+
+   std::map<std::string, t_service*> newServiceMap;
+   for(std::vector<t_service*>::const_iterator newServiceIt = newServices.begin();
+         newServiceIt != newServices.end();
+         newServiceIt++)
+   {
+      newServiceMap[(*newServiceIt)->get_name()] = *newServiceIt;
+   }
+
+
+   for(oldServiceIt = oldServices.begin(); oldServiceIt != oldServices.end(); oldServiceIt++)
+   {
+      const std::string oldServiceName = (*oldServiceIt)->get_name();
+      std::map<std::string, t_service*>::iterator newServiceMapIt = newServiceMap.find(oldServiceName);
+
+      if(newServiceMapIt == newServiceMap.end())
+      {
+         thrift_audit_failure("New Thrift file is missing a service %s\n", oldServiceName.c_str());
+      }
+      else
+      {
+         t_service* oldServiceExtends = (*oldServiceIt)->get_extends();
+         t_service* newServiceExtends = (newServiceMapIt->second)->get_extends();
+
+         if(oldServiceExtends == NULL)
+         {
+            // It is fine to add extends. So if service in older thrift did not have any extends, we are fine.
+            // DO Nothing
+         }
+         else if(oldServiceExtends != NULL && newServiceExtends == NULL)
+         {
+            thrift_audit_failure("Change in Service inheritance for %s\n", oldServiceName.c_str());
+         }
+         else
+         {
+            std::string oldExtendsName = oldServiceExtends->get_name();
+            std::string newExtendsName = newServiceExtends->get_name();
+
+            if( newExtendsName != oldExtendsName)
+            {
+               thrift_audit_failure("Change in Service inheritance for %s\n", oldServiceName.c_str());
+            }
+         }
+
+         compare_functions((newServiceMapIt->second)->get_functions(), (*oldServiceIt)->get_functions());
+      }
+
+   }
+
+}
+
+void compare_consts(const std::vector<t_const*>& newConst, const std::vector<t_const*>& oldConst)
+{
+   std::vector<t_const*>::const_iterator newConstIt;
+   std::vector<t_const*>::const_iterator oldConstIt;
+
+   std::map<std::string, t_const*> newConstMap;
+
+   for(newConstIt = newConst.begin(); newConstIt != newConst.end(); newConstIt++)
+   {
+      newConstMap[(*newConstIt)->get_name()] = *newConstIt;
+   }
+
+   std::map<std::string, t_const*>::const_iterator newConstMapIt;
+   for(oldConstIt = oldConst.begin(); oldConstIt != oldConst.end(); oldConstIt++)
+   {
+      newConstMapIt = newConstMap.find((*oldConstIt)->get_name());
+      if(newConstMapIt == newConstMap.end())
+      {
+         thrift_audit_warning(1, "Constants Missing %s \n", ((*oldConstIt)->get_name()).c_str());
+      }
+      else if(!compare_type((newConstMapIt->second)->get_type(), (*oldConstIt)->get_type()))
+      {
+         thrift_audit_warning(1, "Constant %s is of different type \n", ((*oldConstIt)->get_name()).c_str());
+      }
+      else if(!compare_defaults((newConstMapIt->second)->get_value(), (*oldConstIt)->get_value()))
+      {
+         thrift_audit_warning(1, "Constant %s has different value\n", ((*oldConstIt)->get_name()).c_str());
+      }
+   }
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d709f67d/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.h
----------------------------------------------------------------------
diff --git a/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.h b/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.h
new file mode 100644
index 0000000..fd0013a
--- /dev/null
+++ b/depends/thirdparty/thrift/compiler/cpp/src/audit/t_audit.h
@@ -0,0 +1,11 @@
+#ifndef T_AUDIT_H
+#define T_AUDIT_H
+
+void compare_namespace(t_program* newProgram, t_program* oldProgram);
+void compare_enums(const std::vector<t_enum*>& newEnumList, const std::vector<t_enum*>& oldEnumList);
+bool compare_defaults(t_const_value* newStructDefault, t_const_value* oldStructDefault);
+void compare_structs(const std::vector<t_struct*>& newStructList, const std::vector<t_struct*>& oldStructList);
+void compare_services(const std::vector<t_service*>& newServices, const std::vector<t_service*>& oldServices);
+void compare_consts(const std::vector<t_const*>& newConst, const std::vector<t_const*>& oldConst);
+
+#endif


Mime
View raw message