Skip to content

How to LATERAL VIEW explode #10747

Closed Answered by cpcloud
christophediprima asked this question in Q&A
Discussion options

You must be logged in to vote

This operation is spelled using t.my_column.unnest() or t.unnest("my_column").

TL; DR: start with the first form, and consider the second form if you need to generate array element offsets.

Here's a description of the two forms:

  1. The first form is a column operation, that transforms an array column into a column with the expression of array element type. So, if the column type before calling unnest() is array<T>, then the type after calling unnest() is T. Here's the API documentation for that one: https://ibis-project.org/reference/expression-collections.html#ibis.expr.types.arrays.ArrayValue.unnest
  2. The second form is slightly more advanced and produces a table instead of a new column. It…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cpcloud
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants