Showing with 8,757 additions and 3,699 deletions.
  1. +6 −1 .gitignore
  2. +8 −0 MANIFEST.in
  3. +5 −0 Makefile
  4. +8 −0 conda-recipes/hdfs/bld.bat
  5. +9 −0 conda-recipes/hdfs/build.sh
  6. +39 −0 conda-recipes/hdfs/meta.yaml
  7. +8 −0 conda-recipes/ibis-framework/bld.bat
  8. +9 −0 conda-recipes/ibis-framework/build.sh
  9. +43 −0 conda-recipes/ibis-framework/meta.yaml
  10. +8 −0 conda-recipes/impyla/bld.bat
  11. +9 −0 conda-recipes/impyla/build.sh
  12. +52 −0 conda-recipes/impyla/meta.yaml
  13. +8 −0 conda-recipes/thrift/bld.bat
  14. +9 −0 conda-recipes/thrift/build.sh
  15. +28 −0 conda-recipes/thrift/meta.yaml
  16. +21 −10 dev/merge-pr.py
  17. +48 −13 docs/source/api.rst
  18. +84 −0 docs/source/configuration.rst
  19. +16 −9 docs/source/getting-started.rst
  20. +136 −0 docs/source/impala-udf.rst
  21. +30 −0 docs/source/impala.rst
  22. +10 −2 docs/source/index.rst
  23. +31 −0 docs/source/release.rst
  24. +6 −0 docs/source/sql.rst
  25. +1 −1 docs/source/tutorial.rst
  26. +38 −55 ibis/__init__.py
  27. +75 −854 ibis/client.py
  28. +7 −3 ibis/compat.py
  29. +6 −15 ibis/expr/analysis.py
  30. +5 −4 ibis/expr/analytics.py
  31. +100 −14 ibis/expr/api.py
  32. +439 −0 ibis/expr/datatypes.py
  33. +7 −4 ibis/expr/format.py
  34. +199 −66 ibis/expr/operations.py
  35. +51 −43 ibis/expr/rules.py
  36. +2 −2 ibis/expr/tests/mocks.py
  37. +16 −4 ibis/expr/tests/test_analytics.py
  38. +105 −0 ibis/expr/tests/test_case.py
  39. +12 −0 ibis/expr/tests/test_format.py
  40. +13 −2 ibis/expr/tests/test_interactive.py
  41. +8 −8 ibis/expr/tests/test_sql_builtins.py
  42. +129 −2 ibis/expr/tests/test_table.py
  43. +40 −91 ibis/expr/tests/test_value_exprs.py
  44. +66 −323 ibis/expr/types.py
  45. +38 −4 ibis/filesystems.py
  46. 0 ibis/hive/__init__.py
  47. 0 ibis/hive/tests/__init__.py
  48. 0 ibis/impala/__init__.py
  49. +61 −0 ibis/impala/api.py
  50. +1,426 −0 ibis/impala/client.py
  51. +17 −0 ibis/impala/compat.py
  52. +581 −0 ibis/impala/ddl.py
  53. 0 ibis/{sql → impala}/identifiers.py
  54. 0 ibis/impala/tests/__init__.py
  55. +15 −0 ibis/impala/tests/conftest.py
  56. +212 −0 ibis/impala/tests/test_client.py
  57. +788 −0 ibis/impala/tests/test_ddl.py
  58. +65 −498 ibis/{tests/test_impala_e2e.py → impala/tests/test_exprs.py}
  59. +13 −10 ibis/{ → impala}/tests/test_pandas_interop.py
  60. +46 −0 ibis/impala/tests/test_partition.py
  61. +503 −0 ibis/impala/tests/test_udf.py
  62. +262 −0 ibis/impala/udf.py
  63. 0 ibis/spark/__init__.py
  64. 0 ibis/spark/tests/__init__.py
  65. +39 −30 ibis/sql/compiler.py
  66. +12 −427 ibis/sql/ddl.py
  67. +97 −83 ibis/sql/exprs.py
  68. 0 ibis/sql/presto/__init__.py
  69. 0 ibis/sql/presto/tests/__init__.py
  70. 0 ibis/sql/redshift/__init__.py
  71. 0 ibis/sql/redshift/tests/__init__.py
  72. 0 ibis/sql/sqlite/__init__.py
  73. 0 ibis/sql/sqlite/tests/__init__.py
  74. +205 −522 ibis/sql/tests/test_compiler.py
  75. +180 −164 ibis/sql/tests/test_exprs.py
  76. +16 −16 ibis/sql/tests/test_window.py
  77. 0 ibis/sql/vertica/__init__.py
  78. 0 ibis/sql/vertica/tests/__init__.py
  79. +12 −2 ibis/tests/conftest.py
  80. +117 −5 ibis/tests/test_filesystems.py
  81. +16 −10 ibis/tests/util.py
  82. +44 −62 ibis/util.py
  83. +2 −3 requirements.txt
  84. +0 −50 scripts/cleanup_testing_data.py
  85. +0 −124 scripts/create_test_data_archive.py
  86. +0 −154 scripts/load_test_data.py
  87. +47 −8 scripts/run_jenkins.sh
  88. +379 −0 scripts/test_data_admin.py
  89. +37 −1 setup.py
  90. +51 −0 testing/udf/CMakeLists.txt
  91. +136 −0 testing/udf/hyperloglog-uda.cc
  92. +43 −0 testing/udf/lib/udf-debug.h
  93. +611 −0 testing/udf/lib/udf.h
  94. +180 −0 testing/udf/uda-sample.cc
  95. +125 −0 testing/udf/uda-sample.h
  96. +214 −0 testing/udf/udf-sample.cc
  97. +71 −0 testing/udf/udf-sample.h
  98. +146 −0 testing/udf/variance-uda.cc
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MANIFEST
# Generated sources
*.c
*.cpp

*.cmake
# Python files

# setup.py working directory
Expand All @@ -44,3 +44,8 @@ Icon?
# documentation files
docs/source/generated
docs/source/generated-notebooks

# UDF testing generated files
testing/udf/CMakeCache.txt
testing/udf/CMakeFiles/
testing/udf/Makefile
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ include LICENSE.txt
graft ibis
graft LICENSES
graft scripts
graft conda-recipes

graft docs
prune docs/source/generated
prune docs/source/generated-notebooks
prune docs/build

global-exclude *CMakeCache*
global-exclude *.o
global-exclude *.make
global-exclude *.cmake
global-exclude *.so
global-exclude *.ll
global-exclude *.pyd
global-exclude *.pyc
global-exclude *~
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
SHELL := /bin/bash

all:
python setup.py build_ext --inplace

impala-test:
pushd scripts && python load_test_data.py --udf && popd
8 changes: 8 additions & 0 deletions conda-recipes/hdfs/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"%PYTHON%" setup.py install
if errorlevel 1 exit 1

:: Add more build steps here, if they are necessary.

:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
9 changes: 9 additions & 0 deletions conda-recipes/hdfs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

$PYTHON setup.py install

# Add more build steps here, if they are necessary.

# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.
39 changes: 39 additions & 0 deletions conda-recipes/hdfs/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package:
name: hdfs
version: "1.4.3"

source:
fn: hdfs-1.4.3.tar.gz
url: https://pypi.python.org/packages/source/h/hdfs/hdfs-1.4.3.tar.gz
md5: 872034eb169d9315b71eb00cb7e28ead

build:
entry_points:
- hdfs = hdfs.__main__:main
# - hdfs-avro = hdfs.ext.avro:main # disabled

requirements:
build:
- python
- setuptools
- docopt
- requests >=2.0.1

run:
- python
- docopt
- requests >=2.0.1

test:
imports:
- hdfs
- hdfs.ext

commands:
- hdfs --help
# - hdfs-avro --help # disabled

about:
home: http://hdfscli.readthedocs.org
license: MIT License
summary: 'HdfsCLI: a command line interface for WebHDFS.'
8 changes: 8 additions & 0 deletions conda-recipes/ibis-framework/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
if errorlevel 1 exit 1

:: Add more build steps here, if they are necessary.

:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
9 changes: 9 additions & 0 deletions conda-recipes/ibis-framework/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

$PYTHON setup.py install --single-version-externally-managed --record=record.txt

# Add more build steps here, if they are necessary.

# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.
43 changes: 43 additions & 0 deletions conda-recipes/ibis-framework/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package:
name: ibis-framework
version: "0.3.0"

source:
fn: ibis-framework-0.3.0.tar.gz
url: https://pypi.python.org/packages/source/i/ibis-framework/ibis-framework-0.3.0.tar.gz
md5: 5aafdf43711df3fa45df3e17f68e46d5

requirements:
build:
- python
- setuptools
- pytest
- numpy >=1.7.0
- pandas >=0.12.0
- impyla >=0.9.1
- psutil ==0.6.1
- hdfs >=1.4.0
- six

run:
- python
- pytest
- numpy >=1.7.0
- pandas >=0.12.0
- impyla >=0.9.1
- psutil ==0.6.1
- hdfs >=1.4.0
- six

test:
imports:
- ibis
- ibis.expr
- ibis.expr.tests
- ibis.sql
- ibis.sql.tests
- ibis.tests

about:
license: Apache License, Version 2.0
summary: 'Productivity-centric Python Big Data Framework'
8 changes: 8 additions & 0 deletions conda-recipes/impyla/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"%PYTHON%" setup.py install
if errorlevel 1 exit 1

:: Add more build steps here, if they are necessary.

:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
9 changes: 9 additions & 0 deletions conda-recipes/impyla/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

$PYTHON setup.py install

# Add more build steps here, if they are necessary.

# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.
52 changes: 52 additions & 0 deletions conda-recipes/impyla/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package:
name: impyla
version: "0.10.0"

source:
fn: impyla-0.10.0.tar.gz
url: https://pypi.python.org/packages/source/i/impyla/impyla-0.10.0.tar.gz
md5: 52c35b16b3897dbb53fb59510c33cfaa

build:
preserve_egg_dir: True

requirements:
build:
- python
- setuptools
- six
- thrift
- llvmpy
- numba

run:
- python
- setuptools
- six
- thrift
- llvmpy
- numba

test:
imports:
- impala
- impala._rpc
- impala._thrift_api
- impala._thrift_gen
- impala._thrift_gen.ExecStats
- impala._thrift_gen.ImpalaService
- impala._thrift_gen.Status
- impala._thrift_gen.TCLIService
- impala._thrift_gen.Types
- impala._thrift_gen.beeswax
- impala._thrift_gen.fb303
- impala._thrift_gen.hive_metastore
- impala.dbapi
- impala.tests
- impala.thrift
# - impala.udf # Test fails on osx-64

about:
home: https://github.com/cloudera/impyla
license: Apache License, Version 2.0
summary: 'Python client for the Impala distributed query engine'
8 changes: 8 additions & 0 deletions conda-recipes/thrift/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"%PYTHON%" setup.py install
if errorlevel 1 exit 1

:: Add more build steps here, if they are necessary.

:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
9 changes: 9 additions & 0 deletions conda-recipes/thrift/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

$PYTHON setup.py install

# Add more build steps here, if they are necessary.

# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.
28 changes: 28 additions & 0 deletions conda-recipes/thrift/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package:
name: thrift
version: "0.9.2"

source:
fn: thrift-0.9.2.tar.gz
url: https://pypi.python.org/packages/source/t/thrift/thrift-0.9.2.tar.gz
md5: 91f1c224c46a257bb428431943387dfd

requirements:
build:
- python
- setuptools

run:
- python

test:
imports:
- thrift
- thrift.protocol
- thrift.server
- thrift.transport

about:
home: http://thrift.apache.org
license: Apache License 2.0
summary: 'Python bindings for the Apache Thrift RPC system'
31 changes: 21 additions & 10 deletions dev/merge-pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
print "IBIS_HOME = " + IBIS_HOME

# Remote name with the PR
PR_REMOTE_NAME = os.environ.get("PR_REMOTE_NAME", "origin")
PR_REMOTE_NAME = os.environ.get("PR_REMOTE_NAME", "upstream")

# Remote name where results pushed
PUSH_REMOTE_NAME = os.environ.get("PUSH_REMOTE_NAME", "origin")
PUSH_REMOTE_NAME = os.environ.get("PUSH_REMOTE_NAME", "upstream")

GITHUB_BASE = "https://github.com/cloudera/" + PROJECT_NAME + "/pull"
GITHUB_API_BASE = "https://api.github.com/repos/cloudera/" + PROJECT_NAME
Expand All @@ -50,15 +50,26 @@

os.chdir(IBIS_HOME)

GITHUB_USERNAME = os.environ['GITHUB_USER']
import getpass
GITHUB_PASSWORD = getpass.getpass('Enter github.com password for %s:'
% GITHUB_USERNAME)
auth_required = False

def get_json(url):
auth = HTTPBasicAuth(GITHUB_USERNAME, GITHUB_PASSWORD)
req = requests.get(url, auth=auth)
return req.json()
if auth_required:
GITHUB_USERNAME = os.environ['GITHUB_USER']
import getpass
GITHUB_PASSWORD = getpass.getpass('Enter github.com password for %s:'
% GITHUB_USERNAME)

def get_json_auth(url):
auth = HTTPBasicAuth(GITHUB_USERNAME, GITHUB_PASSWORD)
req = requests.get(url, auth=auth)
return req.json()

get_json = get_json_auth
else:
def get_json_no_auth(url):
req = requests.get(url)
return req.json()

get_json = get_json_no_auth


def fail(msg):
Expand Down
Loading