You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/11/04 20:20:28 UTC

[GitHub] [flink] bowenli86 commented on a change in pull request #10059: [FLINK-14543][table] Support partition for temporary table

bowenli86 commented on a change in pull request #10059: [FLINK-14543][table] Support partition for temporary table
URL: https://github.com/apache/flink/pull/10059#discussion_r342248432
 
 

 ##########
 File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogTableBuilder.java
 ##########
 @@ -66,11 +68,23 @@
 
 	private final boolean isGeneric;
 
+	private final List<String> partitionKeys;
+
 	private Map<String, String> properties = Collections.emptyMap();
 
-	public CatalogTableBuilder(ConnectorDescriptor connectorDescriptor, TableSchema tableSchema) {
+	public CatalogTableBuilder(
+			ConnectorDescriptor connectorDescriptor,
+			TableSchema tableSchema) {
+		this(connectorDescriptor, tableSchema, new ArrayList<>());
+	}
+
+	public CatalogTableBuilder(
+			ConnectorDescriptor connectorDescriptor,
+			TableSchema tableSchema,
+			List<String> partitionKeys) {
 		super(connectorDescriptor);
 		this.tableSchema = Preconditions.checkNotNull(tableSchema);
+		this.partitionKeys = Preconditions.checkNotNull(partitionKeys);
 
 Review comment:
   since it's optional, shall the `partitionKeys` be off the constructor and loaded via "withPartitionKeys(...)"? otherwise it doesn't make sense to have builder pattern

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services