There is an answer, but it’s not exactly simple. Calcite has the concept of 
“system fields” for exactly this. Note the method 
SqlToRelConverter.getSystemFields(), which by default returns an empty list, 
but which you could override to return a field called ROWID.

And then there is Join.getSystemFieldList(), which you can override if left and 
right inputs to the join have system fields and you want to control whether the 
join’s output also has a system field, or system fields.

But it’s not exactly simple. It won’t work out of the box. Assume you’ll need 
to write some tests, and perhaps fix some bugs, to get the behavior you’re 
after.

Julian


> On Nov 21, 2016, at 11:31 AM, Homer <[email protected]> wrote:
> 
> Hi all,
> 
> Have a question which is hopefully a simple answer.
> 
> We have a system column called ROWID.
> 
> We would like that when a SELECT * is executed that by delault the ROWID is 
> not expanded.
> 
> We would like ROWID to only appear in a projection when ROWID is explicitly 
> identified.
> 
> Is there a default way to do this with calcite SQLtypes?
> 
> thanks
> 

Reply via email to