File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -651,12 +651,15 @@ void RecordComponent::storeChunk(
651651void RecordComponent::verifyChunk (
652652 Datatype dtype, Offset const &o, Extent const &e) const
653653{
654- if (constant ())
655- throw std::runtime_error (
656- " Chunks cannot be written for a constant RecordComponent." );
657- if (empty ())
658- throw std::runtime_error (
659- " Chunks cannot be written for an empty RecordComponent." );
654+ if (!std::any_of (e.begin (), e.end (), [](auto val) { return val == 0 ; }))
655+ {
656+ if (constant ())
657+ throw std::runtime_error (
658+ " Chunks cannot be written for a constant RecordComponent." );
659+ if (empty ())
660+ throw std::runtime_error (
661+ " Chunks cannot be written for an empty RecordComponent." );
662+ }
660663 if (!isSame (dtype, getDatatype ()))
661664 {
662665 std::ostringstream oss;
You can’t perform that action at this time.
0 commit comments