calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Nadeau <jacq...@apache.org>
Subject Re: Implicit Columns: Only there when you ask for them...
Date Tue, 18 Apr 2017 21:08:54 GMT
Got it. Thanks Julian!

On Tue, Apr 18, 2017 at 2:02 PM, Julian Hyde <jhyde@apache.org> wrote:

> In Calcite we call that a "system column".
>
> I don't recall whether there's support in the validator to add system
> columns; if not, it could be added.
>
> In Oracle only base tables can have system columns (not even views).
> But in Calcite any relational operator can have them. For instance,
> streaming join is able to add a rowtime system column. Hence the
> Join.getSystemFieldList() method.
>
> On Tue, Apr 18, 2017 at 8:39 AM, Jacques Nadeau <jacques@apache.org>
> wrote:
> > James, thanks for the reminder on EXTENDS. And Julian, thanks for the
> > reminder of the _MAP, that must have been what I was remembering. I'm
> > actually looking for something slightly different:
> >
> > I want a column to exists for validation when explicitly requested but be
> > excluded from star expansion. Any other ideas on how to handle this?
> Think
> > ROWNUM in Oracle. I guess they call it a pseudocolumn.
> >
> > On Mon, Apr 17, 2017 at 11:49 PM, Julian Hyde <jhyde@apache.org> wrote:
> >
> >> There’s also the “_MAP” column returned by the MongoDB and Elasticsearch
> >> adapters. It contains a (key, value) pair for the top-level fields of
> each
> >> row. It DOES appear in SELECT *.
> >>
> >> We had the idea of rewriting
> >>
> >>   SELECT empno FROM Emp
> >>
> >> to
> >>
> >>   SELECT _MAP[‘empno’] FROM Emp
> >>
> >> if Emp had a particular row type but I don’t think we ever did it.
> >>
> >> Julian
> >>
> >>
> >>
> >>
> >> > On Apr 17, 2017, at 7:27 PM, James Taylor <jamestaylor@apache.org>
> >> wrote:
> >> >
> >> > Hey Jacques,
> >> > The EXTENDS (col1 type, col2 type)  keyword can be used for this (and
> the
> >> > EXTENDS keyword is optional). Something like this in Phoenix:
> >> >
> >> > SELECT foo FROM bar (my_col VARCHAR) WHERE my_col = 'bas'
> >> >
> >> > Phoenix uses this for dynamic column support.
> >> >
> >> > Thanks,
> >> > James
> >> >
> >> > On Mon, Apr 17, 2017 at 7:17 PM, Jacques Nadeau <jacques@apache.org>
> >> wrote:
> >> >
> >> >> Hey All,
> >> >>
> >> >> I remember there being a syntax in Calcite that allowed one to
> define an
> >> >> _EXTRA column or columns that could be referenced in Calcite but
> >> wouldn't
> >> >> be included in a select *. If I recall, the Splunk adapter used this
> at
> >> one
> >> >> point. Does this actually exist or have I lost my mind. I can't seem
> to
> >> >> find a reference to this anywhere.
> >> >>
> >> >> thanks!
> >> >>
> >>
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message