Do we have the documentation on how to use `map` c...
# general
s
Do we have the documentation on how to use
map
column? I see
MAP_VALUE
function at https://docs.pinot.apache.org/users/user-guide-query/supported-transformations#multi-value-column-functions However, I don’t see any any instruction on how I can configure the schema & store map value to segments.
c
I think native map type support is not done yet. Current implementation includes treating two multi-valued columns as a map IIRC
s
i see i just found the instructions here https://github.com/apache/incubator-pinot/pull/4388
c
@Kishore G has the latest on native map type support
s
what’s the plan on the native map type support? I guess that one of the existing approach’s limitation is that the map’s value type is fixed given that we use MV column for storing the map
k
What do you mean by map value type is fixed?
j
I think what @Seunghyun means is that all the values of the map must be of the same type
k
Oh, yes
j
@Seunghyun For the
MAP_VALUE
transform function, it works on 2 MV columns with one-to-one mapping on each element
It takes 3 arguments, e.g.
MAP_VALUE(keyCol, 'lookupKey', valCol)
s
Also, I believe it has the limitation that you need to have all keys in all rows.
j
You might need to add a filter on the key column to filter on the look up key first
That's why we are working on a new type of map support now, and maybe replace this one with the new one
k
@Subbu Subramaniam I believe it has the limitation that you need to have all keys in all rows.
No, there is no such limitation
n
btw, you dont have to use all the __KEYS and __VALUES convention anymore. You can use transform functions: https://docs.pinot.apache.org/developers/advanced/ingestion-level-transformations#avro-map