emkornfield commented on a change in pull request #11302:
URL: https://github.com/apache/arrow/pull/11302#discussion_r723687949



##########
File path: cpp/src/arrow/python/arrow_to_python_internal.h
##########
@@ -0,0 +1,52 @@
+// 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.
+
+// Functions for converting between pandas's NumPy-based data representation
+// and Arrow data structures

Review comment:
       yeah.  removed on next commit.

##########
File path: cpp/src/arrow/python/helpers.cc
##########
@@ -321,6 +323,14 @@ void InitPandasStaticData() {
     pandas_NA = ref.obj();
   }
 
+  // Import DateOffset type
+  OwnedRef offsets;
+  if (internal::ImportModule("pandas.tseries.offsets", &offsets).ok()) {

Review comment:
       done in next commit.

##########
File path: cpp/src/arrow/python/datetime.cc
##########
@@ -71,6 +74,26 @@ bool MatchFixedOffset(const std::string& tz, 
util::string_view* sign,
   return iter == (tz.data() + tz.size());
 }
 
+static PyTypeObject MonthDayNanoTupleType = {};
+
+constexpr char* NonConst(const char* st) {
+  // Hack for python versions < 3.7 where members of PyStruct members
+  // where non-const (C++ doesn't like assigning string literals to these 
types)
+  return const_cast<char*>(st);

Review comment:
       we do, I asked that we ddidn't drop it last release.  I would also ask 
that we don't drop it this release (i.e. keep it through its full python 
support cycle.  There are a number of consumers of pyarrow that try to keep 
support for python versions until they dropped it which is end of this year).  
This was caught because we run it in CI.

##########
File path: python/pyarrow/types.pxi
##########
@@ -2176,6 +2176,14 @@ def duration(unit):
     return out
 
 
+def month_day_nano_interval():
+    """
+    Create instance of an interval representing months, days and nanoseconds
+    between two dates.

Review comment:
       this language is consistent with other methods in the file.

##########
File path: python/pyarrow/types.pxi
##########
@@ -2176,6 +2176,14 @@ def duration(unit):
     return out
 
 
+def month_day_nano_interval():
+    """
+    Create instance of an interval representing months, days and nanoseconds
+    between two dates.

Review comment:
       seems good to me.  I liked you other wording also, but we should 
probably do a general cleanup.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to