AbsaOSS / AbsaOSS/spark-hats

Select an element from an array of arrays

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
Scala
Stars
38
Forks
4
PR merge metrics
No merged PRs in 30d

Description

## Background
If you have an array of arrays select doesn't work

## Feature
Be able to select a column from array of arrays

## Example [Optional]
```scala
scala> res0.printSchema
root
|-- id: long (nullable = false)
|-- name: string (nullable = true)
|-- items: array (nullable = true)
| |-- element: struct (containsNull = true)
| | |-- itemid: string (nullable = true)
| | |-- qty: integer (nullable = false)
| | |-- price: double (nullable = false)
| | |-- payments: array (nullable = true)
| | | |-- element: struct (containsNull = true)
| | | | |-- payid: string (nullable = true)
| | | | |-- amount: double (nullable = false)

scala> res0.selectFromArray(col("items.payments.payid"))
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.