News for hackers. Stuff that matters.
Re:Relational Operators in Apache Calcite by noisy_boy on Tuesday April 11, 2023 @02:21AM (#35521498)
I recently had to parse source code of views to produce a mapping between the view columns and the underlying table columns - it basically worked with some caveats and was pretty painful to do (most databases expose this as information schema/metadata but that was not an option for us for various reasons).

For anyone who is knowledgable about Calcite features, is this something that Calcite can produce without having to write a ton of code (which is what my current solution is)? I would find it very satisfying to replace hundreds of lines of bespoke code with a few library calls.

Re:Relational Operators in Apache Calcite by michaelmior on Tuesday April 11, 2023 @07:12AM (#35523446)
This should be pretty easily doable in Calcite if you have access to the query which defines the view. Calcite has a pretty rich metadata system. Take a look at RelMetadataQuery.getColumnOrigin.