|
20 | 20 |
|
21 | 21 | import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.BINARY; |
22 | 22 | import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.BOOLEAN; |
23 | | -import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.DOUBLE; |
24 | 23 | import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY; |
25 | 24 | import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.FLOAT; |
26 | 25 | import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.INT32; |
|
35 | 34 | import org.apache.hadoop.conf.Configuration; |
36 | 35 | import org.apache.hadoop.fs.Path; |
37 | 36 | import org.apache.parquet.cli.testing.CliTestBase; |
38 | | -import org.apache.parquet.cli.testing.CliResult; |
39 | 37 | import org.apache.parquet.example.data.simple.SimpleGroup; |
40 | | -import org.apache.parquet.io.api.Binary; |
41 | 38 | import org.apache.parquet.hadoop.ParquetWriter; |
42 | 39 | import org.apache.parquet.hadoop.example.ExampleParquetWriter; |
43 | 40 | import org.apache.parquet.hadoop.example.GroupWriteSupport; |
| 41 | +import org.apache.parquet.io.api.Binary; |
44 | 42 | import org.apache.parquet.schema.MessageType; |
45 | 43 | import org.apache.parquet.schema.PrimitiveType; |
46 | 44 | import org.junit.Test; |
@@ -75,8 +73,7 @@ private File createParquetFileWithStats() throws IOException { |
75 | 73 |
|
76 | 74 | File file = new File(getTempFolder(), "test.parquet"); |
77 | 75 | String filePath = file.getAbsolutePath(); |
78 | | - ExampleParquetWriter.Builder builder = |
79 | | - ExampleParquetWriter.builder(new Path(filePath)) |
| 76 | + ExampleParquetWriter.Builder builder = ExampleParquetWriter.builder(new Path(filePath)) |
80 | 77 | .withType(schema) |
81 | 78 | .withSizeStatisticsEnabled(true) |
82 | 79 | .withPageRowCountLimit(50) |
@@ -110,8 +107,18 @@ private File createParquetFileWithStats() throws IOException { |
110 | 107 | g.add("Tags", Binary.fromString(possibleTags[rnd.nextInt(possibleTags.length)])); |
111 | 108 | } |
112 | 109 |
|
113 | | - String[] products = {"Laptop", "Mouse", "Keyboard", "Monitor", "Headphones", |
114 | | - "Smartphone", "Tablet", "Camera", "Printer", "Speaker"}; |
| 110 | + String[] products = { |
| 111 | + "Laptop", |
| 112 | + "Mouse", |
| 113 | + "Keyboard", |
| 114 | + "Monitor", |
| 115 | + "Headphones", |
| 116 | + "Smartphone", |
| 117 | + "Tablet", |
| 118 | + "Camera", |
| 119 | + "Printer", |
| 120 | + "Speaker" |
| 121 | + }; |
115 | 122 | g.add("ProductName", Binary.fromString(products[i % products.length] + "_Model_" + (i % 50))); |
116 | 123 |
|
117 | 124 | if (i % 3 != 0) { |
@@ -139,5 +146,4 @@ private File createParquetFileWithStats() throws IOException { |
139 | 146 | public void showsHelpMessage() throws Exception { |
140 | 147 | cli("help size-stats").ok().matchOutputFromFile("src/test/resources/cli-outputs/size-stats-help.txt"); |
141 | 148 | } |
142 | | - |
143 | 149 | } |
0 commit comments