>
> Would the properties support the SecretStore proposed in FLIP-529?

As Timo wrote, not in the first version, but we can extend it once both
FLIPs land in.

>   have just one question, will the option keys be limited to some
> predefined values or it could be any key user wants to add as metadata?
> Like if the user wants to add a description for each argument?

No, there would be no limitations. Those will be just arbitrary properties
that are not interpreted by Flink itself. Similarly as other objects such
as Table, Catalog, Database and so on do.

> Do you want to update `createTemporarySystemFunction` in `TableEnvironment`
> to support `FunctionDescriptor` as well?

I added this method as well to the FLIP.

> What's the difference between the FunctionDescriptor and
> CatalogFunction? In my opinion, they are almost same here. If possible, can
> we reuse the same pojo class here?

I don't think that's a good idea. They serve different purposes. One is a
catalog object (CatalogFunction) that is fully in control of the Catalog
and can have catalog specific implementations. The other is an API object
with a fluent API. The same way as it is for CatalogTable and
TableDescriptor.

> The FLIP writes "The WITH clause will accept a list of key-value pairs
> similar to the syntax currently used in CREATE TABLE, CREATE VIEW, and
> CTAS", but I don't see CREATE VIEW statement works with WITH clause in any
> doc.

That's actually a good point. I was not aware CREATE VIEW does not support
WITH clause. I think this is a mistake of the VIEW implementation.
CatalogView does have properties and there are classes that prepare for
setting them at certain locations[1]. I believe this should be addressed in
a separate FLIP.

> In most cases, the options in the WITH clause are defined by the
> framework or system. But it seems function is different, it's totally
> determined by the users. I prefer we can align the same design to provide
> system-defiend options for users to track version, resource hints.

That's not the purpose of the FLIP. The purpose of the FLIP is to provide a
mechanism for users to pass arbitrary properties from the user to the
catalog and back to the factory that instantiates the function definitions.

Best,
Dawid

[1]
https://github.com/apache/flink/blob/master/flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/ddl/SqlAlterViewProperties.java

On Wed, 30 Jul 2025 at 04:47, Shengkai Fang <fskm...@gmail.com> wrote:

> Hi.
>
> I have some questions about this FLIP:
>
> 1. What's the difference between the FunctionDescriptor and
> CatalogFunction? In my opinion, they are almost same here. If possible, can
> we reuse the same pojo class here?
>
> 2. The FLIP writes "The WITH clause will accept a list of key-value pairs
> similar to the syntax currently used in CREATE TABLE, CREATE VIEW, and
> CTAS", but I don't see CREATE VIEW statement works with WITH clause in any
> doc.
>
> 3. In most cases, the options in the WITH clause are defined by the
> framework or system. But it seems function is different, it's totally
> determined by the users. I prefer we can align the same design to provide
> system-defiend options for users to track version, resource hints.
>
> Best,
> Shengkai
>
> Hao Li <h...@confluent.io.invalid> 于2025年7月30日周三 02:27写道:
>
> > Hi Dawid,
> >
> > Thanks for the FLIP. +1 to support options for functions as well.
> >
> > I have one question:
> > Do you want to update `createTemporarySystemFunction` in
> `TableEnvironment`
> > to support `FunctionDescriptor` as well?
> >
> > Thanks,
> > Hao
> >
> > On Tue, Jul 29, 2025 at 10:33 AM Yash Anand <yashanand.0...@gmail.com>
> > wrote:
> >
> > > Hi Dawid,
> > >
> > > Thank you for initiating this FLIP, looks like a useful addition +1 for
> > the
> > > FLIP.
> > >
> > > I have just one question, will the option keys be limited to some
> > > predefined values or it could be any key user wants to add as metadata?
> > > Like if the user wants to add a description for each argument?
> > >
> > > On Tue, Jul 29, 2025 at 7:09 AM Timo Walther <twal...@apache.org>
> wrote:
> > >
> > > > Maybe not in the first version but eventually nothing in the design
> > > > blocks us for supporting this. The SecretStore would need to be
> > > > available in the FunctionDefinitionFactory for this.
> > > >
> > > > Cheers,
> > > > Timo
> > > >
> > > > On 29.07.25 15:08, Ryan van Huuksloot wrote:
> > > > > Overall the FLIP looks good to me.
> > > > >
> > > > > Would the properties support the SecretStore proposed in FLIP-529?
> > > > >
> > > > > Otherwise, +1, thanks!
> > > > >
> > > > > Ryan van Huuksloot
> > > > > Staff Engineer, Infrastructure | Streaming Platform
> > > > > [image: Shopify]
> > > > > <
> > >
> https://www.shopify.com/?utm_medium=salessignatures&utm_source=hs_email
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Jul 29, 2025 at 4:19 AM Jacky Lau <liuyong...@gmail.com>
> > > wrote:
> > > > >
> > > > >> Thanks for initiating this!
> > > > >>
> > > > >> +1 for this proposal.
> > > > >>
> > > > >> Sergey Nuyanzin <snuyan...@gmail.com> 于2025年7月29日周二 15:34写道:
> > > > >>
> > > > >>> Thanks for driving this Dawid.
> > > > >>>
> > > > >>> looks reasonable to me
> > > > >>>
> > > > >>> On Mon, Jul 28, 2025 at 5:03 PM Ramin Gharib <
> > ramingha...@gmail.com>
> > > > >>> wrote:
> > > > >>>>
> > > > >>>> Hello Dawid,
> > > > >>>>
> > > > >>>> Thanks for initiating this! The FLIP looks well-written.
> > > > >>>> The WITH clause brings consistency to existing syntax.
> > > > >>>>
> > > > >>>> +1 for this proposal.
> > > > >>>>
> > > > >>>> On Mon, Jul 28, 2025 at 3:33 PM Dawid Wysakowicz <
> > > > >> dwysakow...@apache.org
> > > > >>>>
> > > > >>>> wrote:
> > > > >>>>
> > > > >>>>> Hi,
> > > > >>>>> I'd like to start a discussion of FLIP-539: Support WITH Clause
> > in
> > > > >>> CREATE
> > > > >>>>> FUNCTION Statement in Flink SQL [1].
> > > > >>>>>
> > > > >>>>> The existing CREATE FUNCTION  statement in Flink SQL allows
> users
> > > to
> > > > >>>>> register user-defined functions (UDFs) by specifying the class
> > name
> > > > >>> and the
> > > > >>>>> artifact (JAR) containing the implementation. While this design
> > > > >> covers
> > > > >>>>> common use cases, it lacks a declarative mechanism for
> > associating
> > > > >>>>> arbitrary properties or metadata with the function at creation
> > > time.
> > > > >>>>>
> > > > >>>>> Other Flink SQL objects—such as tables—support a WITH  clause
> for
> > > > >>>>> specifying options in a key-value fashion, improving
> consistency,
> > > > >>>>> discoverability, and extensibility.
> > > > >>>>> Looking forward to comments and suggestions for improvements!
> > > > >>>>>
> > > > >>>>> Best,
> > > > >>>>> Dawid
> > > > >>>>>
> > > > >>>>> [1] https://cwiki.apache.org/confluence/x/sg9JFg
> > > > >>>>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> --
> > > > >>> Best regards,
> > > > >>> Sergey
> > > > >>>
> > > > >>
> > > > >
> > > >
> > > >
> > >
> >
>

Reply via email to