[arrow] branch master updated: ARROW-5051: [GLib][Gandiva] Don't return temporary memory

2019-03-29 Thread shiro
This is an automated email from the ASF dual-hosted git repository.

shiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
 new 114985c  ARROW-5051: [GLib][Gandiva] Don't return temporary memory
114985c is described below

commit 114985c3ca8570a683dbc61062ed781daa3ddc8e
Author: Kouhei Sutou 
AuthorDate: Sat Mar 30 04:47:44 2019 +0900

ARROW-5051: [GLib][Gandiva] Don't return temporary memory

Author: Kouhei Sutou 

Closes #4071 from kou/glib-gandiva-fix-string-literal-node-value and 
squashes the following commits:

4a1811b8   Don't return temporary memory
---
 c_glib/gandiva-glib/node.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/c_glib/gandiva-glib/node.cpp b/c_glib/gandiva-glib/node.cpp
index 347473b..0c47a7c 100644
--- a/c_glib/gandiva-glib/node.cpp
+++ b/c_glib/gandiva-glib/node.cpp
@@ -28,7 +28,7 @@
 #include 
 
 template 
-Type
+const Type &
 ggandiva_literal_node_get(GGandivaLiteralNode *node)
 {
   auto gandiva_literal_node =
@@ -1178,7 +1178,7 @@ ggandiva_string_literal_node_new(const gchar *value)
 const gchar *
 ggandiva_string_literal_node_get_value(GGandivaStringLiteralNode *node)
 {
-  auto value = 
ggandiva_literal_node_get(GGANDIVA_LITERAL_NODE(node));
+  auto  = 
ggandiva_literal_node_get(GGANDIVA_LITERAL_NODE(node));
   return value.c_str();
 }
 



[arrow] branch master updated: [Website] Added InAccel as powered by Apache Arrow

2019-03-29 Thread wesm
This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
 new 62b89df  [Website] Added InAccel as powered by Apache Arrow
62b89df is described below

commit 62b89dfa39696031f47ba8d420b1d15a628e5fbc
Author: dlekkas 
AuthorDate: Fri Mar 29 17:38:34 2019 +0200

[Website] Added InAccel as powered by Apache Arrow
---
 site/powered_by.md | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/site/powered_by.md b/site/powered_by.md
index cdfe93a..c6071db 100644
--- a/site/powered_by.md
+++ b/site/powered_by.md
@@ -81,6 +81,11 @@ short description of your use case. See the following for 
some examples.
   team uses Arrow in its NodeJS GPU backend and client libraries, and is an
   early contributing member to GOAI and Arrow\[JS\] focused on bringing these
   technologies to the enterprise.
+* **[InAccel][29]:** A machine learning acceleration framework which leverages
+  FPGAs-as-a-service. InAccel supports dataframes backed by Apache Arrow to 
+  serve as input for our implemented ML algorithms. Those dataframes can be 
+  accessed from the FPGAs with a single DMA operation by implementing a shared
+  memory communication schema. 
 * **[libgdf][14]:** A C library of CUDA-based analytics functions and GPU IPC
   support for structured data. Uses the Arrow IPC format and targets the Arrow
   memory layout in its analytic functions. This work is part of the [GPU Open
@@ -159,3 +164,4 @@ short description of your use case. See the following for 
some examples.
 [26]: https://fastdata.io/
 [27]: https://github.com/apache/arrow/edit/master/site/powered_by.md
 [28]: https://github.com/uber/petastorm
+[29]: https://www.inaccel.com/



[arrow] branch master updated: ARROW-4971: [Go] Add type equality test function

2019-03-29 Thread wesm
This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
 new 701d87e  ARROW-4971: [Go] Add type equality test function
701d87e is described below

commit 701d87e3f8ff6cf2353af7c4d15ae7ba1846bc48
Author: alexandreyc 
AuthorDate: Fri Mar 29 10:33:56 2019 -0500

ARROW-4971: [Go] Add type equality test function

Hello,

In the quest for adding support for array comparison (equality) I just 
added type comparison.

For the moment it considers metadata (only applies to STRUCT type) in the 
comparison. In the C++ implementation they have a flag to ignore metadata. Do 
you think we should have it too?

Feel free to give me your feedback!

A

Author: alexandreyc 

Closes #3981 from alexandreyc/type-equals and squashes the following 
commits:

049831aa8  Add documentation
f828543d6  Update to more idiomatic args list for TypeEquals
e1a49893f  Update checkMetadata flag to functionnal option
20898f7ff  Update to use sub tests
a9d5d8eeb  Update to more idiomatic for range-based loop
0defb8961  Add flag to check for metadata equality
289c5a760  Remove old code
8cee59002  Add type equality test function
---
 go/arrow/compare.go  |  79 +++
 go/arrow/compare_test.go | 252 +++
 2 files changed, 331 insertions(+)

diff --git a/go/arrow/compare.go b/go/arrow/compare.go
new file mode 100644
index 000..17bbd63
--- /dev/null
+++ b/go/arrow/compare.go
@@ -0,0 +1,79 @@
+// 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.
+
+package arrow
+
+import (
+   "reflect"
+)
+
+type typeEqualsConfig struct {
+   metadata bool
+}
+
+// TypeEqualsOption is a functional option type used for configuring type
+// equality checks.
+type TypeEqualsOption func(*typeEqualsConfig)
+
+// CheckMetadata is an option for TypeEquals that allows checking for metadata
+// equality besides type equality. It only makes sense for STRUCT type.
+func CheckMetadata() TypeEqualsOption {
+   return func(cfg *typeEqualsConfig) {
+   cfg.metadata = true
+   }
+}
+
+// TypeEquals checks if two DataType are the same, optionally checking metadata
+// equality for STRUCT types.
+func TypeEquals(left, right DataType, opts ...TypeEqualsOption) bool {
+   var cfg typeEqualsConfig
+   for _, opt := range opts {
+   opt()
+   }
+
+   switch {
+   case left == nil || right == nil:
+   return false
+   case left.ID() != right.ID():
+   return false
+   }
+
+   // StructType is the only type that has metadata.
+   l, ok := left.(*StructType)
+   if !ok || cfg.metadata {
+   return reflect.DeepEqual(left, right)
+   }
+
+   r := right.(*StructType)
+   switch {
+   case len(l.fields) != len(r.fields):
+   return false
+   case !reflect.DeepEqual(l.index, r.index):
+   return false
+   }
+   for i := range l.fields {
+   leftField, rightField := l.fields[i], r.fields[i]
+   switch {
+   case leftField.Name != rightField.Name:
+   return false
+   case leftField.Nullable != rightField.Nullable:
+   return false
+   case !TypeEquals(leftField.Type, rightField.Type, opts...):
+   return false
+   }
+   }
+   return true
+}
diff --git a/go/arrow/compare_test.go b/go/arrow/compare_test.go
new file mode 100644
index 000..16c4daf
--- /dev/null
+++ b/go/arrow/compare_test.go
@@ -0,0 +1,252 @@
+// 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