Showing with 9,261 additions and 1,094 deletions.
  1. +1 −0 .gitattributes
  2. +6 −1 .gitignore
  3. +2 −0 MANIFEST.in
  4. +3 −3 README.md
  5. +14 −11 conda-recipes/hdfs/meta.yaml
  6. +3 −1 conda-recipes/ibis-framework/bld.bat
  7. +3 −1 conda-recipes/ibis-framework/build.sh
  8. +6 −8 conda-recipes/ibis-framework/meta.yaml
  9. +8 −7 conda-recipes/impyla/meta.yaml
  10. +8 −0 conda-recipes/thrift_sasl/bld.bat
  11. +9 −0 conda-recipes/thrift_sasl/build.sh
  12. +27 −0 conda-recipes/thrift_sasl/meta.yaml
  13. +37 −5 docs/source/api.rst
  14. +6 −2 docs/source/conf.py
  15. +14 −7 docs/source/getting-started.rst
  16. +0 −132 docs/source/impala-udf.rst
  17. +779 −14 docs/source/impala.rst
  18. +4 −3 docs/source/index.rst
  19. +78 −11 docs/source/release.rst
  20. +1,297 −3 docs/source/sql.rst
  21. +3 −3 docs/source/tutorial.rst
  22. +4 −0 docs/sphinxext/ipython_sphinxext/LICENSE
  23. 0 docs/sphinxext/ipython_sphinxext/__init__.py
  24. +116 −0 docs/sphinxext/ipython_sphinxext/ipython_console_highlighting.py
  25. +1,089 −0 docs/sphinxext/ipython_sphinxext/ipython_directive.py
  26. +4 −0 ibis/__init__.py
  27. +460 −0 ibis/_version.py
  28. +9 −6 ibis/client.py
  29. +7 −2 ibis/compat.py
  30. +88 −8 ibis/expr/analysis.py
  31. +120 −41 ibis/expr/api.py
  32. +23 −0 ibis/expr/datatypes.py
  33. +13 −4 ibis/expr/format.py
  34. +37 −29 ibis/expr/operations.py
  35. +269 −0 ibis/expr/tests/test_analysis.py
  36. +20 −0 ibis/expr/tests/test_format.py
  37. +17 −7 ibis/expr/tests/test_sql_builtins.py
  38. +11 −1 ibis/expr/tests/test_string.py
  39. +24 −235 ibis/expr/tests/test_table.py
  40. +3 −9 ibis/expr/tests/test_timestamp.py
  41. +24 −0 ibis/expr/tests/test_value_exprs.py
  42. +37 −7 ibis/expr/types.py
  43. +4 −2 ibis/impala/api.py
  44. +676 −233 ibis/impala/client.py
  45. +11 −7 ibis/impala/compiler.py
  46. +201 −23 ibis/impala/ddl.py
  47. +320 −0 ibis/impala/metadata.py
  48. +209 −0 ibis/impala/pandas_interop.py
  49. +16 −0 ibis/impala/parquet.py
  50. +47 −10 ibis/impala/tests/common.py
  51. +42 −2 ibis/impala/tests/test_client.py
  52. +298 −17 ibis/impala/tests/test_ddl.py
  53. +68 −27 ibis/impala/tests/test_exprs.py
  54. +129 −0 ibis/impala/tests/test_metadata.py
  55. +115 −90 ibis/impala/tests/test_pandas_interop.py
  56. +212 −6 ibis/impala/tests/test_partition.py
  57. +2 −0 ibis/impala/udf.py
  58. +34 −6 ibis/sql/alchemy.py
  59. +119 −45 ibis/sql/compiler.py
  60. +4 −3 ibis/sql/sqlite/api.py
  61. +5 −2 ibis/sql/sqlite/client.py
  62. +4 −1 ibis/sql/sqlite/compiler.py
  63. +9 −1 ibis/sql/sqlite/tests/test_client.py
  64. +19 −1 ibis/sql/sqlite/tests/test_functions.py
  65. +151 −17 ibis/sql/tests/test_compiler.py
  66. +43 −0 ibis/sql/tests/test_sqlalchemy.py
  67. +38 −16 ibis/sql/transforms.py
  68. +9 −0 ibis/tests/conftest.py
  69. +16 −2 ibis/tests/test_server.py
  70. +56 −0 ibis/util.py
  71. +1 −2 requirements.txt
  72. +2 −3 scripts/run_jenkins.sh
  73. +7 −0 setup.cfg
  74. +12 −17 setup.py
  75. +1,699 −0 versioneer.py
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ibis/_version.py export-subst
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ docs/source/generated-notebooks
# UDF testing generated files
testing/udf/CMakeCache.txt
testing/udf/CMakeFiles/
testing/udf/Makefile
testing/udf/Makefile
.cache/

# test data
scripts/ibis-testing*
ibis_testing*
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ global-exclude \#*
global-exclude .git*
global-exclude .DS_Store
global-exclude *.png
include versioneer.py
include ibis/_version.py
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Install Ibis from PyPI with:

Ibis is a Python data analysis library with a handful of related goals:

- Enable data analysts to translation analytics on SQL engines to
Python code instead of the SQL code.
- Enable data analysts to transition analytics on SQL engines to Python code
instead of SQL code.
- Provide high level analytics APIs and workflow tools to accelerate
productivity.
- Provide high performance extensions for the Impala MPP query engine to enable
high performance Python code to operate in a scalable Hadoop-like environment
- Abstract away database-specific SQL differences
- Integrate with the Python data ecosystem using the above tools

At this item, Ibis supports the following SQL-based systems:
At this time, Ibis supports the following SQL-based systems:

- Impala (on HDFS)
- SQLite
Expand Down
25 changes: 14 additions & 11 deletions conda-recipes/hdfs/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
package:
name: hdfs
version: "1.4.3"
version: "2.0.2"

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
fn: hdfs-2.0.2.tar.gz
url: https://pypi.python.org/packages/source/h/hdfs/hdfs-2.0.2.tar.gz
md5: ade3a92382e0889e2a845b9cc707c704

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

requirements:
build:
- python
- setuptools
- docopt
- requests >=2.0.1
- requests >=2.7.0
- six >=1.9.0

run:
- python
- docopt
- requests >=2.0.1
- requests >=2.7.0
- six >=1.9.0

test:
imports:
- hdfs
- hdfs.ext
# - hdfs.ext.avro # disabled

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

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

"%PYTHON%" -c "import ibis; print(ibis.__version__)" > __conda_version__.txt

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

:: See
Expand Down
4 changes: 3 additions & 1 deletion conda-recipes/ibis-framework/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

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

$PYTHON -c "import ibis; print(ibis.__version__)" > __conda_version__.txt

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

Expand Down
14 changes: 6 additions & 8 deletions conda-recipes/ibis-framework/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package:
name: ibis-framework
version: "0.4.0"
version: "SETBYINSTALL"

source:
fn: ibis-framework-0.4.0.tar.gz
url: https://pypi.python.org/packages/source/i/ibis-framework/ibis-framework-0.4.0.tar.gz
md5: 87323b54e070a538912cbb8d8174854a
path: ../..

requirements:
build:
Expand All @@ -15,8 +13,8 @@ requirements:
- numpy >=1.7.0
- pandas >=0.12.0
- impyla >=0.10.0
- psutil ==0.6.1
- hdfs ==1.4.3
- hdfs >=2.0.0
- sqlalchemy >=1.0.0
- six

run:
Expand All @@ -25,8 +23,8 @@ requirements:
- numpy >=1.7.0
- pandas >=0.12.0
- impyla >=0.10.0
- psutil ==0.6.1
- hdfs ==1.4.3
- hdfs >=2.0.0
- sqlalchemy >=1.0.0
- six

test:
Expand Down
15 changes: 8 additions & 7 deletions conda-recipes/impyla/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package:
name: impyla
version: "0.10.0"
version: "0.11.2"

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
git_url: https://github.com/cloudera/impyla

build:
preserve_egg_dir: True
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
string: py{{ environ.get('PY_VER').replace('.', '') }}_{{ environ.get('GIT_BUILD_STR', 'GIT_STUB') }}

requirements:
build:
- python
- setuptools
- six
- thrift_sasl
- bitarray
- thrift
- llvmpy
- numba
Expand All @@ -23,14 +24,15 @@ requirements:
- python
- setuptools
- six
- thrift_sasl
- bitarray
- thrift
- llvmpy
- numba

test:
imports:
- impala
- impala._rpc
- impala._thrift_api
- impala._thrift_gen
- impala._thrift_gen.ExecStats
Expand All @@ -41,7 +43,6 @@ test:
- 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
Expand Down
8 changes: 8 additions & 0 deletions conda-recipes/thrift_sasl/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_sasl/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.
27 changes: 27 additions & 0 deletions conda-recipes/thrift_sasl/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package:
name: thrift_sasl
version: "0.1.0"

source:
fn: thrift_sasl-0.1.0.tar.gz
url: https://pypi.python.org/packages/source/t/thrift_sasl/thrift_sasl-0.1.0.tar.gz
md5: 0710ffa4ed33a657090a8305fd71ca1e

requirements:
build:
- python
- setuptools
- thrift

run:
- python
- thrift

test:
imports:
- thrift_sasl

about:
home: https://github.com/cloudera/thrift_sasl
license: Apache License, Version 2.0
summary: 'Thrift SASL Python module that implements SASL transports for Thrift (`TSaslClientTransport`).'
42 changes: 37 additions & 5 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@ Database methods
.. autosummary::
:toctree: generated/

Database.drop
Database.namespace
Database.table
ImpalaDatabase.create_table
ImpalaDatabase.drop
ImpalaDatabase.namespace
ImpalaDatabase.table

Table methods
~~~~~~~~~~~~~

The ``ImpalaClient`` object itself has many helper utility methods. You'll find
the most methods on ``ImpalaTable``.

.. autosummary::
:toctree: generated/

Expand All @@ -71,14 +76,36 @@ Table methods
ImpalaClient.truncate_table
ImpalaClient.get_schema
ImpalaClient.cache_table
ImpalaClient.load_data
ImpalaClient.get_options
ImpalaClient.set_options
ImpalaClient.set_compression_codec


The best way to interact with a single table is through the ``ImpalaTable``
object you get back from ``ImpalaClient.table``.

.. autosummary::
:toctree: generated/

ImpalaTable.add_partition
ImpalaTable.alter
ImpalaTable.alter_partition
ImpalaTable.column_stats
ImpalaTable.compute_stats
ImpalaTable.describe_formatted
ImpalaTable.drop
ImpalaTable.drop_partition
ImpalaTable.files
ImpalaTable.insert
ImpalaTable.invalidate_metadata
ImpalaTable.load_data
ImpalaTable.metadata
ImpalaTable.partition_schema
ImpalaTable.partitions
ImpalaTable.refresh
ImpalaTable.rename
ImpalaTable.stats

Creating views is also possible:

Expand Down Expand Up @@ -263,6 +290,7 @@ Scalar or array methods

ValueExpr.between
ValueExpr.cast
ValueExpr.coalesce
ValueExpr.fillna
ValueExpr.isin
ValueExpr.notin
Expand All @@ -281,14 +309,16 @@ Scalar or array methods
ValueExpr.rdiv
ValueExpr.rsub

ValueExpr.case
ValueExpr.cases
ValueExpr.substitute

Array methods
~~~~~~~~~~~~~

.. autosummary::
:toctree: generated/

ArrayExpr.case
ArrayExpr.cases
ArrayExpr.distinct

ArrayExpr.count
Expand Down Expand Up @@ -398,6 +428,7 @@ All string operations are valid either on scalar or array values
StringValue.translate
StringValue.find_in_set
StringValue.join
StringValue.replace
StringValue.lpad
StringValue.rpad

Expand All @@ -406,6 +437,7 @@ All string operations are valid either on scalar or array values
StringValue.re_extract
StringValue.re_replace

.. _api.timestamp:

Timestamp methods
-----------------
Expand Down
8 changes: 6 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

sys.path.insert(0, os.path.abspath('../sphinxext'))

# -- General configuration ------------------------------------------------

Expand All @@ -33,7 +34,10 @@
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.autosummary',
'numpydoc'
'numpydoc',

'ipython_sphinxext.ipython_directive',
'ipython_sphinxext.ipython_console_highlighting',
]

autosummary_generate = glob.glob("*.rst")
Expand Down
Loading