Open chenzl25 opened 1 year ago
What about making the temporary view a pure frontend stuff, which is stored in the session context and only used by binders? When we're creating streaming jobs, we can directly expand the SQL in the query and translate it into CTE for definition.
What about making the temporary view a pure frontend stuff, which is stored in the session context and only used by binders? When we're creating streaming jobs, we can directly expand the SQL in the query and translate it into CTE for definition.
Yes. That is also the most practical way I can think.
to maintain their streaming SQLs because they have multiple SINKs referring to those VIEWs. Once their streaming queries are created, these VIEWs are no longer needed so we can borrow the syntax from PostgreSQL.
Could you provide some examples here? @chenzl25 Any alternatives to solve this problem?
By the way, creating a materialized view on temporary views in PostgreSQL is not allowed. If we intend to support TEMPORARY VIEW, we should find a way to display the definition of the materialized view created on temporary views.
I feel it's disallowed for a reason. 😂
Could you provide some examples here? @chenzl25 Any alternatives to solve this problem?
Here is the temporary view syntax supported by Flink https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/create/#create-view.
Users can always use CTE as an alternative, but CTE can't be shared between different queries. Users can also use View, but View will exist for a long time (users don't want to see it anymore after they have created sinks).
This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.
Hi, any updates?
Hi, any updates?
A low-priority issue. We don't intend to support it.
This issue has been open for 60 days with no activity.
If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity
label.
You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄
Is your feature request related to a problem? Please describe.
TEMPORARY VIEW: https://www.postgresql.org/docs/current/sql-createview.html
Some users want to use
TEMPORARY VIEW
instead ofCTE
to maintain their streaming SQLs because they have multipleSINK
s referring to thoseVIEW
s. Once their streaming queries are created, theseVIEW
s are no longer needed so we can borrow the syntax from PostgreSQL. By the way, creating a materialized view on temporary views in PostgreSQL is not allowed. If we intend to supportTEMPORARY VIEW
, we should find a way to display the definition of the materialized view created on temporary views. It seems we need to rewrite the original SQL.Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response