karps-0.2.0.0: Haskell bindings for Spark Dataframes and Datasets

Safe HaskellNone
LanguageHaskell2010

Spark.Core.Internal.Projections

Contents

Description

Defines some projections operations over dataframes, observables, and columns. This allows users for a fairly natural manipulation of data.

Synopsis

Documentation

(//) :: forall from proj. Project from proj => from -> proj -> ProjectReturn from proj Source #

The projector operation.

This is the general projection operation in Spark. It lets you extract columns from datasets or dataframes, or sub-observables from observables.

TODO(kps) put an example here.

(/-) :: forall from. Project from Text => from -> Text -> ProjectReturn from Text Source #

The projector operation for string.

This is the general projection operation in Spark. It lets you extract columns from datasets or dataframes, or sub-observables from observables.

Because of a Haskell limitation, this operator is different for strings.

TODO(kps) put an example here.

_1 :: FixedProjection1 Source #

_2 :: FixedProjection2 Source #

Developer functions

data StaticColProjection from to Source #

The class of static projections that are guaranteed to succeed by using the type system.

from is the type of the dataset (which is also a typed dataset) to is the type of the final column.

Constructors

StaticColProjection 

Fields

unsafeStaticProjection Source #

Arguments

:: HasCallStack 
=> SQLType from

The start type

-> String

The name of a field assumed to be found in the start type. This only has to be valid for Spark purposes, not internal Haskell representation.

-> StaticColProjection from to 

Lets the users define their own static projections.

Throws an error if the type cannot be found, so should be used with caution.

String has to be used because of type inferrence issues