[feature] DatasetT
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the existing TypedDataset API and its cats integration, then compare the proposed F[TypedDataset[A]] syntax with the DatasetT wrapper described in the issue. Done would require a settled design and a demonstrated type-safe API for dataset generation and manipulation across read-write boundaries.
Written by the indexing model from the issue text.
Description
I'm reading about this library and think I'm going to use it in my next spark project. I'm really motivated by the ability to reduce needless runtime errors that should be detectable at compile time, and equally by wanting an ergonomic error channel for true runtime errors.
What i see gives me confidence that I can accomplish that using the cats integration with typed datasets. there's one thing that could make it a bunch more ergonomic: one of the biggest places i tend to get runtime errors is at the read-write boundary. say I'm trying to read a table that doesn't exist, or read/write where the schema on disk is incompatible with the one i expect. i can obviously handle this with the existing TypedDataset API after wrapping the IO boundaries in Sync[F].delay... but it would be nice to wrap not only Dataset manipulation but also the generation and subsequent manipulation in a type-safe DSL.
To that end two more-or-less isomorphic ideas come to mind. Both expect at a minimum evidence of Monad[F] (maybe only flatmap for the first one and TypedEncoder[A].
-
additional syntax for F[TypedDataset[A]] that adds all the TypedDataset methods, also wrapped in F[_].
-
an OptionT-like data class wrapping F[TypedDataset[A]]. Naming can be debated but for the sake of presentation, DatasetT. it has default constructor
def apply[F[_]: FlatMap: Ask[*[_], SparkSession], A:TypedEncoder](f: SparkSession => F[TypedDataset[A]])
and various syntactically or situationally preferable variations.
Have either of these patterns been considered? is there any reason they wouldn't make sense to adopt?
Assuming not, I'll try writing in a new project, and -- assuming it proves itself -- will create a PR.
- Dominant language
- Scala
- Stars
- 895
- Forks
- 135
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from typelevel/frameless
-
Scala 3 builds Openenhancement feature help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
enhancement feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in typelevel/frameless
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
typelevel/sbt-typelevel#929 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
softwaremill/tapir#5542 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
lichess-org/lila#21793 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
apache/pekko-projection#635 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100