Hey All,

One of the use cases that we're trying to solve in Drill is unrolling an
inner map. This is used frequently since various types of outputs from UDFs
are maps. Imagine a situation where records are effectively:

{
  id: 123,
  b: {
    x:10,
    y:20
  }
}

We want to the output of the operation to be

{
  id: 123,
  x: 10,
  y:20
}

This is frequently useful if you want to present data to a bi tool. The
question is, what is the right way to express this concept in SQL? The two
ideas I have are:

select t.id, t.b.* from t;

OR

select t.id, t.b as * from t

The first seems to fit well with the existing pattern around * from SQL.
However, we would need to validate that there was no use of an alias since
that would be meaningless in this context. Thinking about that led me to
the second idea.

Any other thoughts/proposals? What do other people think?

Reply via email to