I had attempted this once before in the case of non-virtual columns, and
can only second what Julian mentioned regarding starting from the tests and
working backwards through the Validator APIs specifically in a debugger.
This does remind me though that I filed this addressing a bug I found while
My real goal is to know which virtual columns are used in query.
- I tried to use `getColumnOrigins`, here is one test in RelMetadataTest
```
@Test void testVirtualColumnOrigins() {
final String sql = "select E from VIRTUALCOLUMNS.VC_T1 "
+ "for system_time as of TIMESTAMP '2011-01-02 00:00:00'";
You know, when people ask ‘Does Calcite support lineage?’, I’m never quite
sure. People mean different things by lineage, and it takes a bit of effort to
set up the required APIs.
I think the way to solve this question is with unit tests.
Can write a unit test that fails, or point to an
Hi, all:
I want to know which virtual column is in use. For example,
```
CREATE TABLE peoples(age int, virtual_age int as (age + 1) virtual);
SELECT virtual_age from peoples;
```
After converting, the virtual column is expanded to expression.
```
LogicalProject(virtual_age=[+($0, 1)])