jiangjiguang commented on code in PR #1011:
URL: https://github.com/apache/parquet-mr/pull/1011#discussion_r1115317241


##########
parquet-generator/src/main/java/org/apache/parquet/encoding/vectorbitpacking/BitPackingGenerator512Vector.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+package org.apache.parquet.encoding.vectorbitpacking;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * This class generates vector bit packers that pack the most significant bit 
first.
+ * The result of the generation is checked in. To regenerate the code run this 
class and check in the result.
+ */
+public class BitPackingGenerator512Vector {
+  private static final String CLASS_NAME_PREFIX_FOR_INT = 
"ByteBitPacking512Vector";
+  private static final String CLASS_NAME_PREFIX_FOR_LONG = 
"ByteBitPacking512VectorForLong";
+
+  public static void main(String[] args) throws Exception {
+    String basePath = args[0];
+    //TODO: Int for Big Endian
+    //generateScheme(false, true, basePath);
+
+    // Int for Little Endian
+    generateScheme(false, false, basePath);
+
+    //TODO: Long for Big Endian
+    //generateScheme(true, true, basePath);
+
+    //TODO: Long for Little Endian
+    //generateScheme(true, false, basePath);
+  }
+
+  private static void generateScheme(boolean isLong, boolean msbFirst,

Review Comment:
   @gszadovszky @wgtmac  I add a new module named parquet-encoding-vector on 
directory plugins, the new module implements all code about Vector. I think it 
can keep code clean about java17 and  related class compile/unit test execution
   
   Let name currently code "the new module" option2, and  "the code I realized 
before" option1:
   option2's features are:
   1、the vector code is isolate, an individual unit and minimize the burden of 
future maintenance.
   2、users have to add manully <module>plugins/parquet-encoding-vector</module> 
in parent pom.xml to enable java17 vector optimization
   
   option1's features are:
   1、the vector code is not isolate
   2、users have to maven parameters -P java17-target -P vector on command Line 
to enable java17 vector optimization
    
   I think option2 is better 
   



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