arrow git commit: ARROW-991: [Python] Create new dtype when deserializing from Arrow to NumPy datetime64
Repository: arrow Updated Branches: refs/heads/master 2d6453b25 -> 02161456c ARROW-991: [Python] Create new dtype when deserializing from Arrow to NumPy datetime64 I am not sure how to reproduce the problem, but this will prevent us from mutating a cached dtype in the NumPy internals Author: Wes McKinneyCloses #664 from wesm/ARROW-991 and squashes the following commits: 088aa25 [Wes McKinney] Also new PyArray_NewFromDescr for blocks. Fixes pandas test suite ee1904e [Wes McKinney] Remove unit test 2e70b08 [Wes McKinney] Always create new NPY_DATETIME dtype when converting to pandas Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/02161456 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/02161456 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/02161456 Branch: refs/heads/master Commit: 02161456c3de5199ca0304484aff14fb7349bca4 Parents: 2d6453b Author: Wes McKinney Authored: Tue May 9 20:59:42 2017 -0400 Committer: Wes McKinney Committed: Tue May 9 20:59:42 2017 -0400 -- cpp/src/arrow/python/common.cc | 2 +- cpp/src/arrow/python/common.h | 10 +-- cpp/src/arrow/python/pandas_convert.cc | 103 cpp/src/arrow/status.h | 3 +- cpp/src/arrow/type.cc | 11 ++- cpp/src/arrow/type.h | 6 +- 6 files changed, 70 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/arrow/blob/02161456/cpp/src/arrow/python/common.cc -- diff --git a/cpp/src/arrow/python/common.cc b/cpp/src/arrow/python/common.cc index 5702c71..ba7b6cf 100644 --- a/cpp/src/arrow/python/common.cc +++ b/cpp/src/arrow/python/common.cc @@ -69,7 +69,7 @@ Status CheckPyError(StatusCode code) { PyObject *exc_type, *exc_value, *traceback; PyErr_Fetch(_type, _value, ); PyErr_NormalizeException(_type, _value, ); -PyObject *exc_value_str = PyObject_Str(exc_value); +PyObject* exc_value_str = PyObject_Str(exc_value); PyObjectStringify stringified(exc_value_str); std::string message(stringified.bytes); Py_XDECREF(exc_type); http://git-wip-us.apache.org/repos/asf/arrow/blob/02161456/cpp/src/arrow/python/common.h -- diff --git a/cpp/src/arrow/python/common.h b/cpp/src/arrow/python/common.h index c5745a5..f6e706b 100644 --- a/cpp/src/arrow/python/common.h +++ b/cpp/src/arrow/python/common.h @@ -34,9 +34,7 @@ namespace py { class ARROW_EXPORT PyAcquireGIL { public: - PyAcquireGIL() : acquired_gil_(false) { -acquire(); - } + PyAcquireGIL() : acquired_gil_(false) { acquire(); } ~PyAcquireGIL() { release(); } @@ -113,11 +111,9 @@ struct ARROW_EXPORT PyObjectStringify { Status CheckPyError(StatusCode code = StatusCode::UnknownError); // TODO(wesm): We can just let errors pass through. To be explored later -#define RETURN_IF_PYERROR() \ - RETURN_NOT_OK(CheckPyError()); +#define RETURN_IF_PYERROR() RETURN_NOT_OK(CheckPyError()); -#define PY_RETURN_IF_ERROR(CODE)\ - RETURN_NOT_OK(CheckPyError(CODE)); +#define PY_RETURN_IF_ERROR(CODE) RETURN_NOT_OK(CheckPyError(CODE)); // Return the common PyArrow memory pool ARROW_EXPORT void set_default_memory_pool(MemoryPool* pool); http://git-wip-us.apache.org/repos/asf/arrow/blob/02161456/cpp/src/arrow/python/pandas_convert.cc -- diff --git a/cpp/src/arrow/python/pandas_convert.cc b/cpp/src/arrow/python/pandas_convert.cc index b54197e..264bed1 100644 --- a/cpp/src/arrow/python/pandas_convert.cc +++ b/cpp/src/arrow/python/pandas_convert.cc @@ -977,6 +977,55 @@ Status PandasObjectsToArrow(MemoryPool* pool, PyObject* ao, PyObject* mo, // -- // pandas 0.x DataFrame conversion internals +inline void set_numpy_metadata(int type, DataType* datatype, PyArray_Descr* out) { + if (type == NPY_DATETIME) { +auto date_dtype = reinterpret_cast (out->c_metadata); +if (datatype->id() == Type::TIMESTAMP) { + auto timestamp_type = static_cast (datatype); + + switch (timestamp_type->unit()) { +case TimestampType::Unit::SECOND: + date_dtype->meta.base = NPY_FR_s; + break; +case TimestampType::Unit::MILLI: + date_dtype->meta.base = NPY_FR_ms; + break; +case TimestampType::Unit::MICRO: + date_dtype->meta.base = NPY_FR_us; + break; +case TimestampType::Unit::NANO: + date_dtype->meta.base
[2/2] arrow git commit: ARROW-940: [JS] Generate multiple artifacts
ARROW-940: [JS] Generate multiple artifacts Running `npm run build` now produces three sets of artifacts: * `lib/`: CommonJS modules with typescript declarations * `lib-esm/`: ES6 modules with typescript declarations * `_bundles/`: minified and un-minified bundles with source maps for use in the browser This PR also adds `.npmigore` and `bower.json` to get ready for packaging releases for both npm and bower Author: Brian HuletteCloses #663 from TheNeuralBit/multiple-artifacts and squashes the following commits: a056cd9 [Brian Hulette] update README 7779797 [Brian Hulette] add typescript dev dependency 895c95b [Brian Hulette] update npm main file 71aefb9 [Brian Hulette] Add bower config, add repo to npm config 0d47146 [Brian Hulette] updated read_file example b01bd75 [Brian Hulette] JS lib now creates multiple artifacts: ES5/6 with .d.ts files, and bundles Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/2d6453b2 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/2d6453b2 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/2d6453b2 Branch: refs/heads/master Commit: 2d6453b25318b81af967f0cfdddacf183a60098c Parents: 22c738c Author: Brian Hulette Authored: Tue May 9 18:31:28 2017 -0400 Committer: Wes McKinney Committed: Tue May 9 18:31:28 2017 -0400 -- js/.gitignore | 7 +- js/.npmignore | 7 + js/README.md| 13 +- js/bin/arrow2csv.js | 13 +- js/bin/arrow_schema.js | 2 +- js/bower.json | 17 ++ js/examples/read_file.html | 12 +- js/flatbuffers.sh | 14 +- js/lib/Arrow_generated.d.ts | 5 - js/lib/arrow.ts | 493 js/lib/bitarray.ts | 42 --- js/lib/types.ts | 589 --- js/package.json | 10 +- js/spec/arrow.js| 2 +- js/src/Arrow_generated.d.ts | 5 + js/src/arrow.ts | 493 js/src/bitarray.ts | 42 +++ js/src/types.ts | 589 +++ js/tsconfig.json| 14 +- js/webpack.config.js| 38 ++- 20 files changed, 1236 insertions(+), 1171 deletions(-) -- http://git-wip-us.apache.org/repos/asf/arrow/blob/2d6453b2/js/.gitignore -- diff --git a/js/.gitignore b/js/.gitignore index f67c1cc..ea5514f 100644 --- a/js/.gitignore +++ b/js/.gitignore @@ -1,6 +1,7 @@ -lib/*_generated.js -dist +src/Arrow_generated.js +lib +lib-esm +_bundles node_modules -typings .idea *.iml http://git-wip-us.apache.org/repos/asf/arrow/blob/2d6453b2/js/.npmignore -- diff --git a/js/.npmignore b/js/.npmignore new file mode 100644 index 000..333aeec --- /dev/null +++ b/js/.npmignore @@ -0,0 +1,7 @@ +.gitignore +.npmignore +src/ +spec/ +tsconfig.json +webpack.config.js +flatbuffers.sh http://git-wip-us.apache.org/repos/asf/arrow/blob/2d6453b2/js/README.md -- diff --git a/js/README.md b/js/README.md index cdabf54..167bafc 100644 --- a/js/README.md +++ b/js/README.md @@ -18,9 +18,8 @@ From this directory, run: ``` bash $ npm install # pull dependencies -$ tsc # build typescript -$ webpack # bundle for the browser -$ npm test # run unit tests +$ npm run build # build typescript (run tsc and webpack) +$ npm run test # run the unit tests (node.js only) ``` ### Usage @@ -30,17 +29,17 @@ The library is designed to be used with node.js or in the browser, this reposito Import the arrow module: ``` js -var arrow = require("arrow.js"); +var arrow = require("arrow"); ``` See [bin/arrow_schema.js](bin/arrow_schema.js) and [bin/arrow2csv.js](bin/arrow2csv.js) for usage examples. Browser -Include `dist/arrow-bundle.js` in a `` tag: +Include `_bundles/arrow.js` in a `` tag: ``` html - + ``` -See [examples/read_file.html](examples/read_file.html) for a usage example - or try it out now at [theneuralbit.github.io/arrow](http://theneuralbit.github.io/arrow) +See [examples/read_file.html](examples/read_file.html) for a usage example. ### API # `arrow.getReader(buffer)` http://git-wip-us.apache.org/repos/asf/arrow/blob/2d6453b2/js/bin/arrow2csv.js -- diff --git a/js/bin/arrow2csv.js b/js/bin/arrow2csv.js index 8122e95..c1801f7 100755 --- a/js/bin/arrow2csv.js +++ b/js/bin/arrow2csv.js @@ -19,7 +19,7 @@ var fs = require('fs') var process = require('process'); -var arrow =
[1/2] arrow git commit: ARROW-940: [JS] Generate multiple artifacts
Repository: arrow Updated Branches: refs/heads/master 22c738cc7 -> 2d6453b25 http://git-wip-us.apache.org/repos/asf/arrow/blob/2d6453b2/js/webpack.config.js -- diff --git a/js/webpack.config.js b/js/webpack.config.js index a0ed563..b9c3e83 100644 --- a/js/webpack.config.js +++ b/js/webpack.config.js @@ -10,12 +10,40 @@ // See the License for the specific language governing permissions and // limitations under the License. See accompanying LICENSE file. +var path = require('path'); +var UglifyJSPlugin = require('uglifyjs-webpack-plugin'); + module.exports = { - entry: './dist/arrow.js', + entry: { +'arrow': './src/arrow.ts', +'arrow.min': './src/arrow.ts' + }, output: { -path: __dirname + '/dist', -filename: 'arrow-bundle.js', -libraryTarget: 'var', -library: 'arrow' +path: path.resolve(__dirname, '_bundles'), +filename: '[name].js', +libraryTarget: 'umd', +library: 'arrow', +umdNamedDefine: true + }, + resolve: { +extensions: ['.ts', '.js'] + }, + devtool: 'source-map', + plugins: [ +new UglifyJSPlugin({ + minimize: true, + sourceMap: true, + include: /\.min\.js$/ +}) + ], + module: { +loaders: [{ + test: /\.ts$/, + loader: 'awesome-typescript-loader', + exclude: /node_modules/, + query: { +declaration: false + } +}] } };
arrow git commit: ARROW-874: [JS] Read dictionary-encoded vectors
Repository: arrow Updated Branches: refs/heads/master 670612e6f -> 22c738cc7 ARROW-874: [JS] Read dictionary-encoded vectors Author: Brian HuletteAuthor: Emilio Lahr-Vivaz Author: Brian Hulette Closes #655 from TheNeuralBit/js_dictionary and squashes the following commits: 4fbaf9d [Brian Hulette] add unit tests, fix errors in file format dictionary reading d89c84b [Brian Hulette] Add dictionary support for file format 5bdf8a1 [Emilio Lahr-Vivaz] dictionary encoding c6eff38 [Brian Hulette] Updated API documenation 4c84362 [Brian Hulette] added struct_example tests (Struct type, and multiple record batches) 5a2efe6 [Brian Hulette] add tests for streaming format 9aed94b [Brian Hulette] Fix file format, unit tests e2e0d4d [Emilio Lahr-Vivaz] renaming reader method 844b5e9 [Emilio Lahr-Vivaz] fix for file format bfb7754 [Emilio Lahr-Vivaz] cleanup 162c9be [Emilio Lahr-Vivaz] working for streaming 290497f [Emilio Lahr-Vivaz] js support multiple record batches 4b3b412 [Emilio Lahr-Vivaz] initial support for streaming file format, added FixedSizeList c9d705d [Brian Hulette] Created npm build script 53db587 [Brian Hulette] Fixes to make tests pass 304c669 [Brian Hulette] Added basic js unit tests Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/22c738cc Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/22c738cc Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/22c738cc Branch: refs/heads/master Commit: 22c738cc7b26bff9e7319d438dd3fef1238d46ad Parents: 670612e Author: Brian Hulette Authored: Tue May 9 15:55:27 2017 -0400 Committer: Wes McKinney Committed: Tue May 9 15:55:27 2017 -0400 -- js/.gitignore | 2 + js/README.md| 17 +- js/bin/arrow2csv.js | 9 +- js/bin/arrow_schema.js | 8 +- js/examples/read_file.html | 6 +- js/flatbuffers.sh | 19 + js/lib/arrow.ts | 440 +++ js/lib/bitarray.ts | 17 +- js/lib/types.ts | 581 ++- js/package.json | 12 +- js/postinstall.sh | 18 - js/spec/arrow.js| 179 ++ js/spec/dictionary-stream.arrow | Bin 0 -> 1776 bytes js/spec/dictionary.arrow| Bin 0 -> 2522 bytes js/spec/simple-stream.arrow | Bin 0 -> 1188 bytes js/spec/simple.arrow| Bin 0 -> 1642 bytes js/spec/struct_example-stream.arrow | Bin 0 -> 1884 bytes js/spec/struct_example.arrow| Bin 0 -> 2354 bytes 18 files changed, 1026 insertions(+), 282 deletions(-) -- http://git-wip-us.apache.org/repos/asf/arrow/blob/22c738cc/js/.gitignore -- diff --git a/js/.gitignore b/js/.gitignore index 3b97e3a..f67c1cc 100644 --- a/js/.gitignore +++ b/js/.gitignore @@ -2,3 +2,5 @@ lib/*_generated.js dist node_modules typings +.idea +*.iml http://git-wip-us.apache.org/repos/asf/arrow/blob/22c738cc/js/README.md -- diff --git a/js/README.md b/js/README.md index 98ef756..cdabf54 100644 --- a/js/README.md +++ b/js/README.md @@ -20,6 +20,7 @@ From this directory, run: $ npm install # pull dependencies $ tsc # build typescript $ webpack # bundle for the browser +$ npm test # run unit tests ``` ### Usage @@ -42,9 +43,19 @@ Include `dist/arrow-bundle.js` in a `` tag: See [examples/read_file.html](examples/read_file.html) for a usage example - or try it out now at [theneuralbit.github.io/arrow](http://theneuralbit.github.io/arrow) ### API -# `arrow.loadSchema(buffer)` +# `arrow.getReader(buffer)` +Returns an `ArrowReader` object representing the Arrow file or stream contained in +the `buffer`. + +# `ArrowReader.loadNextBatch()` +Loads the next record batch and returns it's length. + +# `ArrowReader.getSchema()` Returns a JSON representation of the file's Arrow schema. -# `arrow.loadVectors(buffer)` -Returns a dictionary of `Vector` objects, one for each column, indexed by the column's name. +# `ArrowReader.getVectors()` +Returns a list of `Vector` objects, one for each column. Vector objects have, at minimum, a `get(i)` method and a `length` attribute. + +# `ArrowReader.getVector(name: String)` +Return a Vector object for column `name` http://git-wip-us.apache.org/repos/asf/arrow/blob/22c738cc/js/bin/arrow2csv.js -- diff --git a/js/bin/arrow2csv.js b/js/bin/arrow2csv.js index 48df2f9..8122e95
arrow git commit: ARROW-954: Flag for compiling Arrow with header-only boost
Repository: arrow Updated Branches: refs/heads/master ccf83f485 -> 670612e6f ARROW-954: Flag for compiling Arrow with header-only boost Author: Philipp MoritzCloses #647 from pcmoritz/boost-header-only and squashes the following commits: 3605341 [Philipp Moritz] run find_package(Boost) in header-only mode 445de50 [Philipp Moritz] bring back tests 3f1ef1f [Philipp Moritz] reintroduce ARROW_HDFS a047ad4 [Philipp Moritz] deactivate json-integration-test for header-only boost b2b2015 [Philipp Moritz] make it possible to compile arrow with header-only boost Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/670612e6 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/670612e6 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/670612e6 Branch: refs/heads/master Commit: 670612e6fdf699486641ed0d39d22257eb8acdb2 Parents: ccf83f4 Author: Philipp Moritz Authored: Tue May 9 16:01:05 2017 +0200 Committer: Uwe L. Korn Committed: Tue May 9 16:01:05 2017 +0200 -- cpp/CMakeLists.txt | 75 +++ cpp/src/arrow/io/CMakeLists.txt | 4 +- cpp/src/arrow/ipc/CMakeLists.txt | 29 -- 3 files changed, 69 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/arrow/blob/670612e6/cpp/CMakeLists.txt -- diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 72e5ea9..2146379 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -101,6 +101,10 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") "Rely on jemalloc shared libraries where relevant" ON) + option(ARROW_HDFS +"Build the Arrow HDFS bridge" +ON) + option(ARROW_BOOST_USE_SHARED "Rely on boost shared libraries where relevant" ON) @@ -136,6 +140,12 @@ if(NOT ARROW_BUILD_BENCHMARKS) set(NO_BENCHMARKS 1) endif() +if(ARROW_HDFS) + set(ARROW_BOOST_HEADER_ONLY 0) +else() + set(ARROW_BOOST_HEADER_ONLY 1) +endif() + include(BuildUtils) @@ -437,44 +447,54 @@ if (ARROW_BOOST_USE_SHARED) add_definitions(-DBOOST_ALL_DYN_LINK) endif() - find_package(Boost COMPONENTS system filesystem REQUIRED) - if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) -set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) + if (ARROW_BOOST_HEADER_ONLY) +find_package(Boost) else() -set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) -set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) +find_package(Boost COMPONENTS system filesystem REQUIRED) +if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") + set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) + set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) +else() + set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) + set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) +endif() +set(BOOST_SYSTEM_LIBRARY boost_system_shared) +set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_shared) endif() - set(BOOST_SYSTEM_LIBRARY boost_system_shared) - set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_shared) else() # Find static boost headers and libs # TODO Differentiate here between release and debug builds set(Boost_USE_STATIC_LIBS ON) - find_package(Boost COMPONENTS system filesystem regex REQUIRED) - if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) -set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) + if (ARROW_BOOST_HEADER_ONLY) +find_package(Boost) else() -set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) -set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) +find_package(Boost COMPONENTS system filesystem regex REQUIRED) +if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") + set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) + set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) +else() + set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) + set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) +endif() +set(BOOST_SYSTEM_LIBRARY boost_system_static) +set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_static) endif() - set(BOOST_SYSTEM_LIBRARY boost_system_static) - set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_static) endif() message(STATUS "Boost include dir: " ${Boost_INCLUDE_DIRS}) message(STATUS "Boost libraries: "
arrow git commit: ARROW-985: [GLib] Update package information
Repository: arrow Updated Branches: refs/heads/master 74ad4a82b -> ccf83f485 ARROW-985: [GLib] Update package information Author: Kouhei SutouCloses #662 from kou/glib-update-package-info and squashes the following commits: 9005ddd [Kouhei Sutou] [GLib] Update package information Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/ccf83f48 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/ccf83f48 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/ccf83f48 Branch: refs/heads/master Commit: ccf83f48516386e75b844bbc9ad46c1a9a259a92 Parents: 74ad4a8 Author: Kouhei Sutou Authored: Tue May 9 09:00:35 2017 -0400 Committer: Wes McKinney Committed: Tue May 9 09:00:35 2017 -0400 -- c_glib/README.md | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/arrow/blob/ccf83f48/c_glib/README.md -- diff --git a/c_glib/README.md b/c_glib/README.md index b6e08e3..7d0ea3a 100644 --- a/c_glib/README.md +++ b/c_glib/README.md @@ -55,6 +55,7 @@ There are supported platforms: * Debian GNU/Linux Jessie * Ubuntu 16.04 LTS * Ubuntu 16.10 + * Ubuntu 17.04 * CentOS 7 You can feedback to https://github.com/kou/arrow-packages about @@ -62,6 +63,13 @@ packages things. Debian GNU/Linux jessie +You need to install `apt-transport-https` to use HTTPS for APT +repository. + +```text +% sudo apt install -y apt-transport-https +``` + You need to add the following apt-lines to `/etc/apt/sources.list.d/groonga.list`: @@ -84,7 +92,7 @@ Now you can install Arrow GLib packages: % sudo apt install -y libarrow-glib-dev ``` - Ubuntu 16.04 LTS and Ubuntu 16.10 + Ubuntu You need to add an APT repository:
arrow git commit: ARROW-984: [GLib] Add Go examples
Repository: arrow Updated Branches: refs/heads/master af0c21e9a -> 74ad4a82b ARROW-984: [GLib] Add Go examples Author: Kouhei SutouCloses #661 from kou/glib-example-go and squashes the following commits: 22e35cb [Kouhei Sutou] [GLib] Add Go examples Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/74ad4a82 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/74ad4a82 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/74ad4a82 Branch: refs/heads/master Commit: 74ad4a82b1c6c376809dd0e2a2be9fe2fa54a9ac Parents: af0c21e Author: Kouhei Sutou Authored: Tue May 9 08:58:59 2017 -0400 Committer: Wes McKinney Committed: Tue May 9 08:58:59 2017 -0400 -- c_glib/.gitignore | 5 + c_glib/example/go/Makefile | 35 ++ c_glib/example/go/README.md | 78 + c_glib/example/go/arrow-1.0/arrow.go.in | 38 +++ c_glib/example/go/arrow-1.0/config.json | 21 c_glib/example/go/read-batch.go | 100 + c_glib/example/go/read-stream.go| 101 + c_glib/example/go/write-batch.go| 162 +++ c_glib/example/go/write-stream.go | 162 +++ 9 files changed, 702 insertions(+) -- http://git-wip-us.apache.org/repos/asf/arrow/blob/74ad4a82/c_glib/.gitignore -- diff --git a/c_glib/.gitignore b/c_glib/.gitignore index 6f2de80..796b842 100644 --- a/c_glib/.gitignore +++ b/c_glib/.gitignore @@ -41,3 +41,8 @@ Makefile.in /example/build /example/read-batch /example/read-stream +!/example/go/Makefile +/example/go/read-batch +/example/go/read-stream +/example/go/write-batch +/example/go/write-stream http://git-wip-us.apache.org/repos/asf/arrow/blob/74ad4a82/c_glib/example/go/Makefile -- diff --git a/c_glib/example/go/Makefile b/c_glib/example/go/Makefile new file mode 100644 index 000..d883112 --- /dev/null +++ b/c_glib/example/go/Makefile @@ -0,0 +1,35 @@ +# 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. See accompanying LICENSE file. + +PROGRAMS = \ + read-batch \ + read-stream \ + write-batch \ + write-stream + +all: build + +generate: + $$GOPATH/bin/gir-generator \ + -o $$GOPATH/src/gir/arrow-1.0 \ + -config arrow-1.0/config.json \ + arrow-1.0/arrow.go.in + +build: $(PROGRAMS) + +clean: + rm -f $(PROGRAMS) + +.SUFFIXES: .go + +.go: + go build -o $@ $< http://git-wip-us.apache.org/repos/asf/arrow/blob/74ad4a82/c_glib/example/go/README.md -- diff --git a/c_glib/example/go/README.md b/c_glib/example/go/README.md new file mode 100644 index 000..2054055 --- /dev/null +++ b/c_glib/example/go/README.md @@ -0,0 +1,78 @@ + + +# Arrow Go example + +There are Go example codes in this directory. + +## How to run + +All example codes use +[go-gir-generator](https://github.com/linuxdeepin/go-gir-generator) to +use Arrow GLib based bindings. + +See [../../README.md](../../README.md) how to install Arrow GLib. You +can use packages to install Arrow GLib. The following instructions +assumes that you've installed Arrow GLib by package. Package name is +`libarrow-glib-dev` on Debian GNU/Linux and Ubuntu, `arrow-glib-devel` +on CentOS. + +Here are command lines to install go-gir-generator on Debian GNU/Linux +and Ubuntu: + +```text +% sudo apt install -V -y libarrow-glib-dev golang git libgirepository1.0-dev libgudev-1.0-dev +% export GOPATH=$HOME +% go get github.com/linuxdeepin/go-gir-generator +% cd $GOPATH/src/github.com/linuxdeepin/go-gir-generator +% make build copyfile +% mkdir -p $GOPATH/bin/ +% cp -a out/gir-generator $GOPATH/bin/ +% cp -a out/src/gir/ $GOPATH/src/ +``` + +Now, you can generate Arrow bindings for Go: + +```text +% git clone https://github.com/apache/arrow.git ~/arrow +% cd ~/arrow/c_glib/example/go +% make generate +``` + +Then you can build all