saadtajwar commented on code in PR #22962:
URL: https://github.com/apache/datafusion/pull/22962#discussion_r3417455394
##########
datafusion/datasource/src/test_util.rs:
##########
@@ -131,3 +131,32 @@ impl FileSource for MockSource {
pub(crate) fn col(name: &str, schema: &Schema) -> Result<Arc<dyn
PhysicalExpr>> {
Ok(Arc::new(Column::new_with_schema(name, schema)?))
}
+
+/// Chunk sizes exercised by every parameterised test.
+///
+/// `usize::MAX` is intentionally included: `ChunkedStore` treats it as
+/// "one chunk containing everything", giving the single-chunk fast path.
+pub const CHUNK_SIZES: &[usize] = &[1, 2, 3, 4, 5, 7, 8, 11, 13, 16,
usize::MAX];
Review Comment:
I copied this from #20823, so this is duplicate code that's also in
`datasource-json` - `AlignedBoundaryStream` was copied from there but the unit
tests needed this helper which lives behind `#[cfg(test)]` in the JSON crate
lol, so I just copied - if there's a better approach here to deduplicate please
let me know and I'm happy to modify this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]