File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
google-cloud-bigquery/src
main/java/com/google/cloud/bigquery
test/java/com/google/cloud/bigquery Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ public class FormatOptions implements Serializable {
43
43
static final String GOOGLE_SHEETS = "GOOGLE_SHEETS" ;
44
44
static final String PARQUET = "PARQUET" ;
45
45
static final String ORC = "ORC" ;
46
+ static final String ICEBERG = "ICEBERG" ;
46
47
47
48
private static final long serialVersionUID = -443376052020423691L ;
48
49
@@ -115,6 +116,11 @@ public static FormatOptions orc() {
115
116
return new FormatOptions (ORC );
116
117
}
117
118
119
+ /** Default options for the Apache Iceberg table format. */
120
+ public static FormatOptions iceberg () {
121
+ return new FormatOptions (ICEBERG );
122
+ }
123
+
118
124
/** Default options for the provided format. */
119
125
public static FormatOptions of (String format ) {
120
126
checkArgument (!isNullOrEmpty (format ), "Provided format is null or empty" );
@@ -130,6 +136,8 @@ public static FormatOptions of(String format) {
130
136
return bigtable ();
131
137
} else if (format .equals (PARQUET )) {
132
138
return parquet ();
139
+ } else if (format .equals (ICEBERG )) {
140
+ return iceberg ();
133
141
}
134
142
return new FormatOptions (format );
135
143
}
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public void testFactoryMethods() {
41
41
assertEquals (FormatOptions .DATASTORE_BACKUP , FormatOptions .datastoreBackup ().getType ());
42
42
assertEquals (FormatOptions .AVRO , FormatOptions .avro ().getType ());
43
43
assertEquals (FormatOptions .GOOGLE_SHEETS , FormatOptions .googleSheets ().getType ());
44
+ assertEquals (FormatOptions .ICEBERG , FormatOptions .iceberg ().getType ());
44
45
}
45
46
46
47
@ Test
@@ -53,5 +54,6 @@ public void testEquals() {
53
54
assertEquals (
54
55
FormatOptions .datastoreBackup ().hashCode (), FormatOptions .datastoreBackup ().hashCode ());
55
56
assertEquals (FormatOptions .googleSheets (), FormatOptions .googleSheets ());
57
+ assertEquals (FormatOptions .iceberg (), FormatOptions .iceberg ());
56
58
}
57
59
}
You can’t perform that action at this time.
0 commit comments