Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-05-05 Thread Timo Walther
Hi everyone, if there are no objections, I would start a voting thread by tomorrow. Thanks, Timo On 29.04.25 11:46, Timo Walther wrote: Hi Hao, thanks for your feedback. Currently, the Python API does not support structured types at all. So this might require another FLIP in the future with

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-29 Thread Timo Walther
Hi Hao, thanks for your feedback. Currently, the Python API does not support structured types at all. So this might require another FLIP in the future with a dedicated effort. However, I have considered Python already in the design. Also Python classes are discoverable from a fully qualified

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-24 Thread Hao Li
Hi Timo, Thanks for the clarification. It's very helpful. For the classpath, I suppose it can also support Python later if it's called in Python table api? Do we want to indicate if it's Java classpath or Python class? Or we support a list of classpath which can consist both Python, Java or other

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-24 Thread Arvid Heise
Hi Timo, thank you very much for responding. I see that this is just the first step to get consistency between SQL and Table API and more work is to come. I still think that there is some redundancy between STRUCT and ROW but tbh I have more issues with ROW than with STRUCT. (What is even the mea

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-24 Thread Timo Walther
Hi Arvid, Hi Hao, thanks for this valuable feedback. Let me clarify a few things before I go into the details. Just to avoid any confusion: the FLIP does not propose introducing the StructuredType. Structured types backed by classes already exist in Flink for years and are already supported

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-23 Thread Hao Li
I think Arvid has a good point. Why not define Object type without class and when you get it in table api, try to cast it to some class? I found https://docs.oracle.com/javase/1.5.0/docs/guide/jdbc/getstart/mapping.html. Under `JAVA_OBJECT` type section. They have: ``` ResultSet rs = stmt.execute

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-23 Thread Arvid Heise
Hi Timo, thanks for addressing my points. I'm not set on using STRUCT et al. but wanted to point out the alternatives. Regarding the attached class name, I have similar confusion to Hao. I wonder if Structures types shouldn't be anonymous by default in the sense that initially we don't attach a c

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Timo Walther
Hi Hao, 1. Can `StructuredType` be nested? Yes this is supported. 2. What's the main reason the class won't be enforced in SQL? SQL should not care about classes. Within the SQL ecosystem, the SQL engine controls the data serialization and protocols. The SQL engine will not load the class. C

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Hao Li
Hi Timo, Thanks for the FLIP. +1 with a few questions: 1. Can `StructuredType` be nested? e.g. `STRUCTURED<'com.example.User', name STRING, age INT NOT NULL, address STRUCTURED<'com.example.address', street STRING, zip STRING>>` 2. What's the main reason the class won't be enforced in SQL? Since

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Timo Walther
Hi Arvid, Hi Sergey, thanks for your feedback. I updated the FLIP accordingly but let me answer your questions here as well: > Are we going to enforce that the name is a valid class name? What is > happening if it's not a correct name? > What are the implications of using a class that is not i

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Timo Walther
It seems the original DISCUSS thread was split into two. I will answer in the original thread for improving the history. Cheers, Timo On 22.04.25 15:23, Arvid Heise wrote: Hi Timo, +1 for the proposal. A couple of remarks: - Are we going to enforce that the name is a valid class name? What is

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Arvid Heise
Hi Timo, +1 for the proposal. A couple of remarks: - Are we going to enforce that the name is a valid class name? What is happening if it's not a correct name? - What are the implications of using a class that is not in the classpath in Table API? It looks to me that the name is metadata-only unti

RE: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Gustavo de Morais
Thanks for the small but important changes proposed. IMO, these are essential for dealing with these directly in SQL. On 2025/04/10 05:54:58 Timo Walther wrote: > Hi everyone, > > I would like to start a discussion about FLIP-520: Simplify > StructuredType handling [1]. > > Flink SQL already

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Sergey Nuyanzin
Thanks for driving this Timo The FLIP seems reasonable to me I have one minor question/clarification do I understand it correct that after this FLIP we can execute of `typeof` against result of `OBJECT_OF` for instance SELECT typeof(OBJECT_OF( 'com.example.User', 'name', 'Bob', 'age', 42 )

Re: [DISCUSS] FLIP-520: Simplify StructuredType handling

2025-04-22 Thread Timo Walther
Hi everyone, I would like to ask again for feedback on this FLIP. It is a rather small change but with big impact on usability for structured data. Are there any objections? Otherwise I would like to continue with voting soon. Thanks, Timo On 10.04.25 07:54, Timo Walther wrote: Hi everyon