Skip to content

Couple Frame and Header  #11

Description

@ocramz
  • A Header is uniquely determined by the type of the input data
  • once data are encoded in a Frame, we compute a Header from the type (with header)
  • relational operations such as JOINs, and tidying operations produce dataframes that have a different (larger or smaller) column set than the one of either operands
  • this is why a new Header should be derived when producing the operation result, and stored in the resulting Frame

possible representation :

data Frame = Frame {
    frameRows :: [Row [TC] VP]
  , frameHeader :: Header [TC]
}

currently, the information in Header and Val is not compatible:

λ> gflattenHM $ MkC1 42
fromList [([TC "C" "c1"],42)]
λ> 
λ> header (Proxy @C)
HSum "C" (fromList [("MkC3",HLeaf "()"),("MkC1",HLeaf "Int"),("MkC2",HProd "A" (fromList [("MkA",HLeaf "Int")]))])

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions