karps-0.2.0.0: Haskell bindings for Spark Dataframes and Datasets

Safe HaskellNone
LanguageHaskell2010

Spark.Core.Internal.Utilities

Description

A collection of small utility functions.

Synopsis

Documentation

type HasCallStack = ?callStack :: CallStack #

Request a CallStack.

NOTE: The implicit parameter ?callStack :: CallStack is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: 4.9.0.0

data UnknownType Source #

A type that is is not known and that is not meant to be exposed to the user.

pretty :: Value -> Text Source #

Pretty printing for Aeson values (and deterministic output)

myGroupBy :: Ord a => [(a, b)] -> Map a [b] Source #

group by TODO: have a non-empty list instead

myGroupBy' :: Ord b => (a -> b) -> [a] -> [(b, [a])] Source #

group by TODO: have a non-empty list instead

missing :: HasCallStack => Text -> a Source #

Missing implementations in the code base.

failure :: HasCallStack => Text -> a Source #

The function that is used to trigger exception due to internal programming errors.

Currently, all programming errors simply trigger an exception. All these impure functions are tagged with an implicit call stack argument.

failure' :: HasCallStack => Format Text (a -> Text) -> a -> c Source #

forceRight :: (HasCallStack, Show a) => Either a b -> b Source #

Given a DataFrame or a LocalFrame, attempts to get the value, or throws the error.

This function is not total.

show' :: Show a => a -> Text Source #

show with Text

encodeDeterministicPretty :: Value -> ByteString Source #

Produces a bytestring output of a JSON value that is deterministic and that is invariant to the insertion order of the keys. (i.e the keys are stored in alphabetic order) This is to ensure that all id computations are stable and reproducible on the server part. TODO(kps) use everywhere JSON is converted

strictList :: Show a => [a] -> [a] Source #

Force the complete evaluation of a list to WNF.

traceHint :: Show a => Text -> a -> a Source #

(internal) prints a hint with a value

sh :: Show a => Format r (a -> r) #

Output a showable value (instance of Show) by turning it into Text.

(<&>) :: Functor f => f a -> (a -> b) -> f b Source #

(<>) :: Monoid m => m -> m -> m infixr 6 #

An infix synonym for mappend.

Since: 4.5.0.0