You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/05 09:24:24 UTC

[GitHub] [arrow] westonpace opened a new pull request #9100: Added a test to try and reproduce arrow-11067. Since it can only fai…

westonpace opened a new pull request #9100:
URL: https://github.com/apache/arrow/pull/9100


   …l on mac I'm going to commit just the test first to see if it fails properly and I can avoid setting up a mac devenv.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on pull request #9100: Added a test to try and reproduce arrow-11067. Since it can only fai…

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754557189


   I restarted the MacOS jobs because they did fail, but not for the right reason :-(


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] westonpace commented on pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
westonpace commented on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754793203


   @pitrou I'm pretty sure it is.  Is there something I need to check?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #9100: Added a test to try and reproduce arrow-11067. Since it can only fai…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754533608


   <!--
     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.
   -->
   
   Thanks for opening a pull request!
   
   Could you open an issue for this pull request on JIRA?
   https://issues.apache.org/jira/browse/ARROW
   
   Then could you also rename pull request title in the following format?
   
       ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] westonpace commented on a change in pull request #9100: ARROW-11067: [C++] read_csv_arrow silently fails to read some strings and returns nulls

Posted by GitBox <gi...@apache.org>.
westonpace commented on a change in pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#discussion_r552047298



##########
File path: cpp/src/arrow/util/trie_test.cc
##########
@@ -175,6 +175,15 @@ TEST(Trie, EmptyString) {
   ASSERT_EQ(-1, trie.Find("x"));
 }
 
+TEST(Trie, LongString) {
+  TrieBuilder builder;
+  ASSERT_OK(builder.Append(""));
+  const Trie trie = builder.Finish();
+  auto maxlen = static_cast<size_t>(std::numeric_limits<int16_t>::max()) + 1;

Review comment:
       I did this and split the cases into good cases and "good & bad" cases.  For the good cases I confirmed we can insert and match.  For the "good & bad" cases I confirmed we don't match the empty string.  I tested on Mac and the test failed (it matched the empty string).  I then added your patch and it passed (well, it failed because of the >/>= issue but passed after that).
   
   I'm testing 2^15-2, 2^15-1, 2^14 (good) and 2^15, 2^16-2 (bad).  Do you think that covers it?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #9100: Added a test to try and reproduce arrow-11067. Since it can only fai…

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#discussion_r551852896



##########
File path: cpp/src/arrow/util/trie_test.cc
##########
@@ -175,6 +175,15 @@ TEST(Trie, EmptyString) {
   ASSERT_EQ(-1, trie.Find("x"));
 }
 
+TEST(Trie, LongString) {
+  TrieBuilder builder;
+  ASSERT_OK(builder.Append(""));
+  const Trie trie = builder.Finish();
+  auto maxlen = static_cast<size_t>(std::numeric_limits<int16_t>::max()) + 1;

Review comment:
       We may want to test with a bunch of limit-case sizes (e.g. `2^n, 2^n-1, 2^n+1` for `n` in 15, 16, 17).




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] westonpace commented on a change in pull request #9100: ARROW-11067: [C++] read_csv_arrow silently fails to read some strings and returns nulls

Posted by GitBox <gi...@apache.org>.
westonpace commented on a change in pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#discussion_r552044312



##########
File path: cpp/src/arrow/util/trie.h
##########
@@ -125,6 +126,9 @@ class ARROW_EXPORT Trie {
   int32_t Find(util::string_view s) const {
     const Node* node = &nodes_[0];
     fast_index_type pos = 0;
+    if (s.length() > static_cast<size_t>(kMaxIndex)) {

Review comment:
       @pitrou One small difference from your original patch.  This changed from >= to >.  Could you review that?  My test of the boundary cases considered a string of length 2^n-1 as valid and so I either needed to remove that case or change the comparison (and I chose the latter).




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754772279


   @westonpace is Github Actions enabled on your fork?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754794793


   @westonpace MinGW Windows builds I think.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou edited a comment on pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
pitrou edited a comment on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754794793


   @westonpace C++ MinGW Windows builds I think.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] bkietz closed pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
bkietz closed pull request #9100:
URL: https://github.com/apache/arrow/pull/9100


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#discussion_r552071844



##########
File path: cpp/src/arrow/util/trie_test.cc
##########
@@ -175,6 +175,15 @@ TEST(Trie, EmptyString) {
   ASSERT_EQ(-1, trie.Find("x"));
 }
 
+TEST(Trie, LongString) {
+  TrieBuilder builder;
+  ASSERT_OK(builder.Append(""));
+  const Trie trie = builder.Finish();
+  auto maxlen = static_cast<size_t>(std::numeric_limits<int16_t>::max()) + 1;

Review comment:
       Yes, thank you.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#discussion_r552071145



##########
File path: cpp/src/arrow/util/trie.h
##########
@@ -125,6 +126,9 @@ class ARROW_EXPORT Trie {
   int32_t Find(util::string_view s) const {
     const Node* node = &nodes_[0];
     fast_index_type pos = 0;
+    if (s.length() > static_cast<size_t>(kMaxIndex)) {

Review comment:
       Nice, thank you!




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #9100: ARROW-11067: [C++] Fix CSV null detection on large values

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9100:
URL: https://github.com/apache/arrow/pull/9100#issuecomment-754789122


   https://issues.apache.org/jira/browse/ARROW-11067


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org