Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Query array value by index/posistion
Labels:
- Labels:
-
Apache Impala
Contributor
Created on ‎06-13-2017 12:53 PM - edited ‎09-16-2022 04:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to get array data by position? If B is an array under A, can i do something like
select B[0].value, B[1].value
from A
Thanks
Shannon
1 REPLY 1
Guru
Created ‎06-14-2017 06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shannon,
Impala does not yet support array or map subscripts. What you can do is something like this:
select a.value from mytable t, t.myarray a where a.pos in (0,1)
But this will give you the "values" elements as rows and not in different columns.
