yjshen commented on code in PR #2968:
URL: https://github.com/apache/arrow-datafusion/pull/2968#discussion_r931755169
##########
datafusion/core/src/dataframe.rs:
##########
@@ -1266,4 +1266,45 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn row_writer_resize_test() -> Result<()> {
+ let schema = Arc::new(Schema::new(vec![arrow::datatypes::Field::new(
+ "column_1",
+ DataType::Utf8,
+ false,
+ )]));
+
+ let data = RecordBatch::try_new(
+ schema.clone(),
+ vec![
+ Arc::new(arrow::array::StringArray::from(vec![
+
Some("2a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+
Some("3a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800"),
+ ])),
+ ],
+ )?;
+
+ let table = crate::datasource::MemTable::try_new(schema,
vec![vec![data]])?;
+
+ let ctx = SessionContext::new();
+ ctx.register_table("test", Arc::new(table))?;
+
+ let sql = r#"
+ SELECT
+ COUNT(1)
+ FROM
+ test
+ GROUP BY
+ column_1"#;
+
+ // let df = ctx.sql("SELECT * FROM test").await.unwrap();
+ // df.show_limit(10).await.unwrap();
+ // dbg!(df.schema());
Review Comment:
We'd better remove this I suppose.
##########
datafusion/row/src/writer.rs:
##########
@@ -269,29 +269,29 @@ impl RowWriter {
/// Stitch attributes of tuple in `batch` at `row_idx` and returns the tuple
width
pub fn write_row(
- row: &mut RowWriter,
+ row_writer: &mut RowWriter,
Review Comment:
This renaming is unrelated, I think?
--
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]