GitHub PullRequestReviewCommentEvent at 2014-04-01 16:56:00
Repository: parquet-mr
Actor: egonina
Payload: {"comment":{"url":"https://api.github.com/repos/Parquet/parquet-mr/pulls/comments/11169428","id":11169428,"diff_hunk":"@@ -454,6 +526,56 @@ private void testSchema(MessageType messageSchema, List<Group> groups) {\n     }\n   }\n \n+  private void testStatisticsWriteToColumn(MessageType messageSchema, List<Group> groups,\n+                                           IntStatistics intStats, LongStatistics longStats,\n+                                           FloatStatistics floatStats, DoubleStatistics doubleStats,\n+                                           BinaryStatistics binaryStats, BooleanStatistics boolStats,\n+                                           BinaryStatistics int96Stats){\n+    MemPageStore memPageStore = new MemPageStore(groups.size());\n+    ColumnWriteStoreImpl columns = newColumnWriteStore(memPageStore);\n+\n+    ColumnIOFactory columnIOFactory = new ColumnIOFactory(true);\n+    MessageColumnIO columnIO = columnIOFactory.getColumnIO(messageSchema);\n+    log(columnIO);\n+\n+    // Write groups.\n+    GroupWriter groupWriter =\n+        new GroupWriter(columnIO.getRecordWriter(columns), messageSchema);\n+    for (Group group : groups) {\n+      groupWriter.write(group);\n+    }\n+    columns.flush();\n+\n+    // Verify statistics for each type of colunm\n+    Set<ColumnDescriptor> columnPaths = columns.getColumnDescriptors();\n+    for (ColumnDescriptor c : columnPaths) {\n+      ColumnWriter cw = columns.getColumnWriter(c);\n+      switch(c.getType()) {\n+      case INT32:\n+        assertTrue(((IntStatistics)cw.getColumnStatistics()).equals(intStats));","path":"parquet-column/src/test/java/parquet/io/TestColumnIO.java","position":133,"original_position":133,"commit_id":"621cf4e92be3dd3f2dd1a92a8dd12f244a7d7be3","original_commit_id":"621cf4e92be3dd3f2dd1a92a8dd12f244a7d7be3","user":{"login":"egonina","id":3441503,"avatar_url":"https://avatars.githubusercontent.com/u/3441503?","gravatar_id":"9d1cae249aed773f930e7b9ec2a870ca","url":"https://api.github.com/users/egonina","html_url":"https://github.com/egonina","followers_url":"https://api.github.com/users/egonina/followers","following_url":"https://api.github.com/users/egonina/following{/other_user}","gists_url":"https://api.github.com/users/egonina/gists{/gist_id}","starred_url":"https://api.github.com/users/egonina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonina/subscriptions","organizations_url":"https://api.github.com/users/egonina/orgs","repos_url":"https://api.github.com/users/egonina/repos","events_url":"https://api.github.com/users/egonina/events{/privacy}","received_events_url":"https://api.github.com/users/egonina/received_events","type":"User","site_admin":false},"body":"Yes, but we need to know what correct stats to compare to (passed as arguments to this test function).","created_at":"2014-04-01T16:56:00Z","updated_at":"2014-04-01T16:56:00Z","html_url":"https://github.com/Parquet/parquet-mr/pull/338#discussion_r11169428","pull_request_url":"https://api.github.com/repos/Parquet/parquet-mr/pulls/338","_links":{"self":{"href":"https://api.github.com/repos/Parquet/parquet-mr/pulls/comments/11169428"},"html":{"href":"https://github.com/Parquet/parquet-mr/pull/338#discussion_r11169428"},"pull_request":{"href":"https://api.github.com/repos/Parquet/parquet-mr/pulls/338"}}}}