typelevel / typelevel/frameless

Unexpected behavior of Encoding of nested Options

Open
#109 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion documentation wontfix
Dominant language
Scala
Stars
895
Forks
135
Avg merge
1d 16h
Merged PRs (30d)
3

Description

> val f: Option[Option[Option[Int]]] = None
> val d = TypedDataset.create( f :: Nil )
> println( d.collect().run() )
WrappedArray(Some(Some(None)))

expected is WrappedArray(None)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the nested-Option example with TypedDataset.create and collect().run(). Trace the encoding used for nested Options and verify that the result changes from WrappedArray(Some(Some(None))) to the expected WrappedArray(None).

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, spark
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.