You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "yuzelin (Jira)" <ji...@apache.org> on 2022/11/01 02:08:00 UTC
[jira] [Comment Edited] (FLINK-29821) Schema.Builder how to set not null column?
[ https://issues.apache.org/jira/browse/FLINK-29821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626907#comment-17626907 ]
yuzelin edited comment on FLINK-29821 at 11/1/22 2:07 AM:
----------------------------------------------------------
Hi Alvin,
I did a simple test under the flink master branch and it works. And I have checked the `primaryKey` implementation:
public Builder primaryKey(String... columnNames) {
Preconditions.checkNotNull(columnNames, "Primary key column names must not be null.");
return primaryKey(Arrays.asList(columnNames));
}
I think it won't cause problem. Can you share more information, such as the context of your code?
was (Author: JIRAUSER293222):
Hi Alvin,
I did a simple test under the flink master branch and it works. And I have checked the `primaryKey` implementation:
public Builder primaryKey(String... columnNames) \{
Preconditions.checkNotNull(columnNames, "Primary key column names must not be null.");
return primaryKey(Arrays.asList(columnNames));
}
I think it won't cause problem. Can you share more information, such as what version do you use?
> Schema.Builder how to set not null column?
> ------------------------------------------
>
> Key: FLINK-29821
> URL: https://issues.apache.org/jira/browse/FLINK-29821
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: shaded-16.0
> Environment: Windows local development env.
> Reporter: Alvin Ge
> Priority: Not a Priority
>
> {code:java}
> // code placeholder
> Schema.Builder schemaBuilder = Schema.newBuilder();
> schemaBuilder.column("id", DataTypes.BIGINT())
> .column("value", DataTypes.STRING())
> .primaryKey("id"); {code}
> When I was setting primary key, console print primary key can not be null, but I don't know how to setting my primay key not null....
--
This message was sent by Atlassian Jira
(v8.20.10#820010)