When string values are required and inside an optional nested group, the group is skipped over in LogicalBatchReaderFactory and we only use a single LeafReader instance to read values. This should read null into destination rows where the enclosing group is null. But when _nullableLeafValues is false in the BufferedReader, only the non-null values would be read so we'd reach the end of the values before reaching the expected number of rows/levels.
We don't have the same problem for a required int inside an optional group for example as this is detected in GetCompoundReader when typeof(TElement) != typeof(TLogical) and is handled specially with the OptionalReader class.
Fixes #480.
When string values are required and inside an optional nested group, the group is skipped over in
LogicalBatchReaderFactory
and we only use a singleLeafReader
instance to read values. This should read null into destination rows where the enclosing group is null. But when_nullableLeafValues
is false in theBufferedReader
, only the non-null values would be read so we'd reach the end of the values before reaching the expected number of rows/levels.We don't have the same problem for a required int inside an optional group for example as this is detected in
GetCompoundReader
whentypeof(TElement) != typeof(TLogical)
and is handled specially with theOptionalReader
class.