All Projects → typelevel → Frameless

typelevel / Frameless

Licence: apache-2.0
Expressive types for Spark.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Frameless

Sup
Composable, purely functional healthchecks in Scala.
Stars: ✭ 138 (-80.75%)
Mutual labels:  typelevel, functional-programming, fp
Monix
Asynchronous, Reactive Programming for Scala and Scala.js.
Stars: ✭ 1,819 (+153.7%)
Mutual labels:  typelevel, functional-programming, fp
Doobie
Functional JDBC layer for Scala.
Stars: ✭ 1,910 (+166.39%)
Mutual labels:  typelevel, functional-programming, fp
Shapeless
Generic programming for Scala
Stars: ✭ 3,207 (+347.28%)
Mutual labels:  typelevel, functional-programming, fp
Pfps Shopping Cart
🛒 The Shopping Cart application developed in the book "Practical FP in Scala: A hands-on approach"
Stars: ✭ 262 (-63.46%)
Mutual labels:  functional-programming, fp
Hammock
Purely functional HTTP client
Stars: ✭ 174 (-75.73%)
Mutual labels:  typelevel, fp
Eslint Plugin Functional
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Stars: ✭ 282 (-60.67%)
Mutual labels:  functional-programming, fp
Fun Task
Abstraction for managing asynchronous code in JS
Stars: ✭ 363 (-49.37%)
Mutual labels:  functional-programming, fp
Monocle
Optics library for Scala
Stars: ✭ 1,357 (+89.26%)
Mutual labels:  typelevel, functional-programming
Prelude Ts
Functional programming, immutable collections and FP constructs for typescript and javascript
Stars: ✭ 315 (-56.07%)
Mutual labels:  functional-programming, fp
Kotlin Result
A multiplatform Result monad for modelling success or failure operations.
Stars: ✭ 369 (-48.54%)
Mutual labels:  functional-programming, fp
Fp Jargon Zh
函数式编程术语及示例。本项目译自 https://github.com/hemanth/functional-programming-jargon
Stars: ✭ 507 (-29.29%)
Mutual labels:  functional-programming, fp
Fasy
FP iterators that are both eager and asynchronous
Stars: ✭ 488 (-31.94%)
Mutual labels:  functional-programming, fp
Bow
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
Stars: ✭ 538 (-24.97%)
Mutual labels:  functional-programming, fp
Freestyle
A cohesive & pragmatic framework of FP centric Scala libraries
Stars: ✭ 627 (-12.55%)
Mutual labels:  spark, functional-programming
Monio
Async-capable IO monad for JS
Stars: ✭ 311 (-56.62%)
Mutual labels:  functional-programming, fp
Monix Bio
Asynchronous data type with typed errors.
Stars: ✭ 80 (-88.84%)
Mutual labels:  typelevel, functional-programming
Spotted Leopards
Proof of concept for a cats-like library built using Dotty features
Stars: ✭ 91 (-87.31%)
Mutual labels:  typelevel, functional-programming
Cats Infographic
typeclass diagram for cats
Stars: ✭ 403 (-43.79%)
Mutual labels:  typelevel, fp
Fkit
A functional programming toolkit for JavaScript.
Stars: ✭ 588 (-17.99%)
Mutual labels:  functional-programming, fp

Frameless

Travis Badge Codecov Badge Maven Badge Gitter Badge

Frameless is a Scala library for working with Spark using more expressive types. It consists of the following modules:

  • frameless-dataset for a more strongly typed Dataset/DataFrame API
  • frameless-ml for a more strongly typed Spark ML API based on frameless-dataset
  • frameless-cats for using Spark's RDD API with cats

Note that while Frameless is still getting off the ground, it is very possible that breaking changes will be made for at least the next few versions.

The Frameless project and contributors support the Typelevel Code of Conduct and want all its associated channels (e.g. GitHub, Gitter) to be a safe and friendly environment for contributing and learning.

Versions and dependencies

The compatible versions of Spark and cats are as follows:

Frameless Spark Cats Cats-Effect Scala
0.4.0 2.2.0 1.0.0-IF 0.4 2.11
0.4.1 2.2.0 1.x 0.8 2.11
0.5.2 2.2.1 1.x 0.8 2.11
0.6.1 2.3.0 1.x 0.8 2.11
0.7.0 2.3.1 1.x 1.x 2.11
0.8.0 2.4.0 1.x 1.x 2.11/2.12
0.9.0 3.0.0 1.x 1.x 2.12
0.10.1 3.1.0 2.x 2.x 2.12

Versions 0.5.x and 0.6.x have identical features. The first is compatible with Spark 2.2.1 and the second with 2.3.0.

The only dependency of the frameless-dataset module is on shapeless 2.3.2. Therefore, depending on frameless-dataset, has a minimal overhead on your Spark's application jar. Only the frameless-cats module depends on cats and cats-effect, so if you prefer to work just with Datasets and not with RDDs, you may choose not to depend on frameless-cats.

Frameless intentionally does not have a compile dependency on Spark. This essentially allows you to use any version of Frameless with any version of Spark. The aforementioned table simply provides the versions of Spark we officially compile and test Frameless with, but other versions may probably work as well.

Breaking changes in 0.9

  • Spark 3 introduces a new ExpressionEncoder approach, the schema for single value DataFrame's is now "value" not "_1".

Why?

Frameless introduces a new Spark API, called TypedDataset. The benefits of using TypedDataset compared to the standard Spark Dataset API are as follows:

  • Typesafe columns referencing (e.g., no more runtime errors when accessing non-existing columns)
  • Customizable, typesafe encoders (e.g., if a type does not have an encoder, it should not compile)
  • Enhanced type signature for built-in functions (e.g., if you apply an arithmetic operation on a non-numeric column, you get a compilation error)
  • Typesafe casting and projections

Click here for a detailed comparison of TypedDataset with Spark's Dataset API.

Documentation

Quick Start

Since the 0.9.x release, Frameless is compiled only against Scala 2.12.x.

To use Frameless in your project add the following in your build.sbt file as needed:

val framelessVersion = "0.9.0" // for Spark 3.0.0

libraryDependencies ++= List(
  "org.typelevel" %% "frameless-dataset" % framelessVersion,
  "org.typelevel" %% "frameless-ml"      % framelessVersion,
  "org.typelevel" %% "frameless-cats"    % framelessVersion  
)

An easy way to bootstrap a Frameless sbt project:

  • if you have Giter8 installed then simply:
g8 imarios/frameless.g8
  • with sbt >= 0.13.13:
sbt new imarios/frameless.g8

Typing sbt console inside your project will bring up a shell with Frameless and all its dependencies loaded (including Spark).

Need help?

Feel free to messages us on our gitter channel for any issues/questions.

Development

We require at least one sign-off (thumbs-up, +1, or similar) to merge pull requests. The current maintainers (people who can merge pull requests) are:

Testing

Frameless contains several property tests. To avoid OutOfMemoryErrors, we tune the default generator sizes. The following environment variables may be set to adjust the size of generated collections in the TypedDataSet suite:

Property Default
FRAMELESS_GEN_MIN_SIZE 0
FRAMELESS_GEN_SIZE_RANGE 20

License

Code is provided under the Apache 2.0 license available at http://opensource.org/licenses/Apache-2.0, as well as in the LICENSE file. This is the same license used as Spark.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].