Skip to content

Commit

Permalink
Add new table format test for ParquetTypeGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-alhuang committed Jul 27, 2024
1 parent 3325c1d commit 89dd17c
Show file tree
Hide file tree
Showing 2 changed files with 670 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2022-2024 Snowflake Computing Inc. All rights reserved.
*/

package net.snowflake.ingest.streaming.internal;
Expand All @@ -16,6 +16,7 @@ public class ColumnMetadataBuilder {
private Integer length;
private boolean nullable;
private String collation;
private String sourceIcebergDataType;

private Integer ordinal;

Expand Down Expand Up @@ -144,6 +145,17 @@ public ColumnMetadataBuilder collation(String collation) {
return this;
}

/**
* Set column source Iceberg data type
*
* @param sourceIcebergDataType source Iceberg data type string
* @return columnMetadataBuilder object
*/
public ColumnMetadataBuilder sourceIcebergDataType(String sourceIcebergDataType) {
this.sourceIcebergDataType = sourceIcebergDataType;
return this;
}

/**
* Set column ordinal
*
Expand Down Expand Up @@ -172,6 +184,7 @@ public ColumnMetadata build() {
colMetadata.setScale(scale);
colMetadata.setPrecision(precision);
colMetadata.setCollation(collation);
colMetadata.setSourceIcebergDataType(sourceIcebergDataType);
colMetadata.setOrdinal(ordinal);
return colMetadata;
}
Expand Down
Loading

0 comments on commit 89dd17c

Please sign in to comment.