You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2021/02/18 12:07:43 UTC

[GitHub] [parquet-mr] fschmalzel opened a new pull request #870: PARQUET-1984: Allow tests to run on windows

fschmalzel opened a new pull request #870:
URL: https://github.com/apache/parquet-mr/pull/870


   Check for \r\n lineendings instead of \n
   Change file layout (backslash and slash) to check
   Close files / streams before deleting file
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [ ] My PR addresses the following [Parquet Jira](https://issues.apache.org/jira/browse/PARQUET-1984) issue.
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason: It fixes tests for the windows platform.
   
   ### Commits
   
   - [ ] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain Javadoc that explain what it does
   


----------------------------------------------------------------
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] [parquet-mr] fschmalzel commented on pull request #870: PARQUET-1984: Allow tests to run on windows

Posted by GitBox <gi...@apache.org>.
fschmalzel commented on pull request #870:
URL: https://github.com/apache/parquet-mr/pull/870#issuecomment-781958818


   Thanks for the retriggering the tests and the quick review. I've fixed the problems from the review.


----------------------------------------------------------------
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] [parquet-mr] gszadovszky commented on a change in pull request #870: PARQUET-1984: Allow tests to run on windows

Posted by GitBox <gi...@apache.org>.
gszadovszky commented on a change in pull request #870:
URL: https://github.com/apache/parquet-mr/pull/870#discussion_r578513538



##########
File path: parquet-hadoop/src/test/java/org/apache/parquet/statistics/TestStatistics.java
##########
@@ -479,6 +479,7 @@ public void test() throws IOException {
       while ((pageReadStore = reader.readNextRowGroup()) != null) {
         validator.validate(metadata.getFileMetaData().getSchema(), pageReadStore);
       }
+      reader.close();

Review comment:
       I would suggest using try-with-resources to ensure reader is always closed

##########
File path: parquet-thrift/src/test/java/org/apache/parquet/hadoop/thrift/TestParquetToThriftReadWriteAndProjection.java
##########
@@ -377,9 +377,9 @@ private void shouldDoProjectionWithThriftColumnFilter(String filterDesc, TBase t
         readValue = reader.getCurrentValue();
         LOG.info("{}", readValue);
       }
+      reader.close();

Review comment:
       Same as above

##########
File path: parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInputFormat.java
##########
@@ -398,7 +399,10 @@ public void testGetFootersReturnsInPredictableOrder() throws IOException {
       if (i > 0) {
         url.append(',');
       }
-      url.append("file:").append(file.getAbsolutePath());
+      if (!SystemUtils.IS_OS_WINDOWS) {
+        url.append("file:");
+      }
+      url.append(file.getAbsolutePath());

Review comment:
       I don't have any experience running Hadoop on Windows but I am not sure this is the good approach to pass the tests. I think it would be better to expect the same configuration on the different systems and handle OS relevant paths in the production code if required.




----------------------------------------------------------------
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] [parquet-mr] fschmalzel commented on a change in pull request #870: PARQUET-1984: Allow tests to run on windows

Posted by GitBox <gi...@apache.org>.
fschmalzel commented on a change in pull request #870:
URL: https://github.com/apache/parquet-mr/pull/870#discussion_r579050976



##########
File path: parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInputFormat.java
##########
@@ -398,7 +399,10 @@ public void testGetFootersReturnsInPredictableOrder() throws IOException {
       if (i > 0) {
         url.append(',');
       }
-      url.append("file:").append(file.getAbsolutePath());
+      if (!SystemUtils.IS_OS_WINDOWS) {
+        url.append("file:");
+      }
+      url.append(file.getAbsolutePath());

Review comment:
       I've changed this test to use URIs instead. Now it should work platform independent.




----------------------------------------------------------------
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] [parquet-mr] gszadovszky merged pull request #870: PARQUET-1984: Allow tests to run on windows

Posted by GitBox <gi...@apache.org>.
gszadovszky merged pull request #870:
URL: https://github.com/apache/parquet-mr/pull/870


   


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