Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork devgrok's changes #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions zebra-cli/src/Zebra/Command/Merge.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import qualified Viking.ByteStream as ByteStream
import qualified X.Data.Vector.Cons as Cons

import Zebra.Command.Util
import Zebra.Merge.Table (UnionTableError)
import Zebra.Merge.Table (UnionTableError, MergeRowsPerBlock(..))
import qualified Zebra.Merge.Table as Merge
import Zebra.Serial.Binary (BinaryStripedEncodeError, BinaryStripedDecodeError)
import Zebra.Serial.Binary (BinaryVersion(..))
Expand All @@ -58,11 +58,6 @@ data Merge =
, mergeMaximumRowSize :: !(Maybe MergeMaximumRowSize)
} deriving (Eq, Ord, Show)

newtype MergeRowsPerBlock =
MergeRowsPerBlock {
unMergeRowsPerBlock :: Int
} deriving (Eq, Ord, Show)

newtype MergeMaximumRowSize =
MergeMaximumRowSize {
unMergeMaximumRowSize :: Int64
Expand Down Expand Up @@ -127,8 +122,6 @@ zebraMerge x = do
writeFileOrStdout (mergeOutput x) .
hoist (firstJoin MergeBinaryStripedEncodeError) .
Binary.encodeStripedWith (mergeVersion x) .
hoist (firstJoin MergeStripedError) .
Striped.rechunk (unMergeRowsPerBlock $ mergeRowsPerChunk x) .
hoist (firstJoin MergeUnionTableError) $
union msize inputs
union msize (mergeRowsPerChunk x) inputs
{-# SPECIALIZE zebraMerge :: Merge -> EitherT MergeError (ResourceT IO) () #-}
1 change: 1 addition & 0 deletions zebra-core/ambiata-zebra-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ library
, ambiata-x-vector
, aeson >= 1.0 && < 1.5
, aeson-pretty == 0.8.*
, async
, attoparsec >= 0.13 && < 0.14
, base64-bytestring == 1.0.*
, bifunctors >= 4.2 && < 5.6
Expand Down
Loading