This is an automated email from the ASF dual-hosted git repository.

htowaileb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 50d67194d4 [ASTERIXDB-3392] Minor formatting COPY TO parquet
50d67194d4 is described below

commit 50d67194d47c8b9f63bf5c325405f22a4d19a02b
Author: preetham0202 <[email protected]>
AuthorDate: Thu Feb 13 16:42:41 2025 +0530

    [ASTERIXDB-3392] Minor formatting COPY TO parquet
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Ext-ref: MB-65167
    Change-Id: I009fc9e2d4e6cde0f4469b0e6979bf625eae7576
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19414
    Integration-Tests: Jenkins <[email protected]>
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: <[email protected]>
    Reviewed-by: Hussain Towaileb <[email protected]>
---
 .../external/writer/printer/ParquetExternalFilePrinter.java  |  7 +++----
 .../writer/printer/ParquetExternalFilePrinterFactory.java    | 12 ++++++------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinter.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinter.java
index 046c03f707..2f95b3eb2d 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinter.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinter.java
@@ -40,16 +40,15 @@ public class ParquetExternalFilePrinter implements 
IExternalPrinter {
     private final CompressionCodecName compressionCodecName;
     private final MessageType schema;
     private ParquetOutputFile parquetOutputFile;
-    //    private String parquetSchemaString;
     private ParquetWriter<IValueReference> writer;
     private final long rowGroupSize;
     private final int pageSize;
     private final ParquetProperties.WriterVersion writerVersion;
 
-    public ParquetExternalFilePrinter(CompressionCodecName 
compressionCodecName, MessageType parquetSchemaString,
-            IAType typeInfo, long rowGroupSize, int pageSize, 
ParquetProperties.WriterVersion writerVersion) {
+    public ParquetExternalFilePrinter(CompressionCodecName 
compressionCodecName, MessageType schema, IAType typeInfo,
+            long rowGroupSize, int pageSize, ParquetProperties.WriterVersion 
writerVersion) {
         this.compressionCodecName = compressionCodecName;
-        this.schema = parquetSchemaString;
+        this.schema = schema;
         this.typeInfo = typeInfo;
         this.rowGroupSize = rowGroupSize;
         this.pageSize = pageSize;
diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinterFactory.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinterFactory.java
index 035e49ac7c..d93decd403 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinterFactory.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinterFactory.java
@@ -30,9 +30,9 @@ import org.apache.parquet.schema.MessageType;
 
 public class ParquetExternalFilePrinterFactory implements 
IExternalPrinterFactory {
     private static final long serialVersionUID = 8971234908711235L;
-    // parquetInferSchema is for the case when the schema is inferred from the 
data, not provided by the user
+    // parquetInferredSchema is for the case when the schema is inferred from 
the data, not provided by the user
     // set During the runtime
-    private transient MessageType parquetInferSchema;
+    private transient MessageType parquetInferredSchema;
     // parquetProvidedSchema is for the case when the schema is provided by 
the user
     private ARecordType parquetProvidedSchema;
     private final IAType typeInfo;
@@ -61,14 +61,14 @@ public class ParquetExternalFilePrinterFactory implements 
IExternalPrinterFactor
         this.writerVersion = writerVersion;
     }
 
-    public void setParquetSchema(MessageType parquetInferSchema) {
-        this.parquetInferSchema = parquetInferSchema;
+    public void setParquetSchema(MessageType parquetInferredSchema) {
+        this.parquetInferredSchema = parquetInferredSchema;
     }
 
     @Override
     public IExternalPrinter createPrinter() {
-        if (parquetInferSchema != null) {
-            return new ParquetExternalFilePrinter(compressionCodecName, 
parquetInferSchema, typeInfo, rowGroupSize,
+        if (parquetInferredSchema != null) {
+            return new ParquetExternalFilePrinter(compressionCodecName, 
parquetInferredSchema, typeInfo, rowGroupSize,
                     pageSize, writerVersion);
         }
 

Reply via email to