Another attempt at enconding empty values

This commit is contained in:
Alejandro Serrano 2020-05-12 13:46:37 +02:00
parent 821fcf5b39
commit f2409162bf
No known key found for this signature in database
GPG Key ID: A04B82DC1AD554C3

View File

@ -76,8 +76,11 @@ instance GRPCOutput AvroRPC () where
encodeEmpty :: Compression -> Builder
encodeEmpty compression =
mconcat [ singleton (if _compressionByteSet compression then 1 else 0)
, putWord32be 0
, putWord32be (fromIntegral $ ByteString.length bin)
, fromByteString bin
]
where
bin = _compressionFunction compression ""
instance forall (sch :: Schema') (sty :: Symbol) (i :: Type).
( HasAvroSchema (WithSchema sch sty i)