yjshen commented on code in PR #3363: URL: https://github.com/apache/arrow-datafusion/pull/3363#discussion_r963217863
########## datafusion/common/Cargo.toml: ########## @@ -39,12 +39,12 @@ pyarrow = ["pyo3"] [dependencies] apache-avro = { version = "0.14", features = ["snappy"], optional = true } -arrow = { version = "21.0.0", features = ["prettyprint"] } +arrow = { version = "22.0.0", features = ["prettyprint"] } avro-rs = { version = "0.13", features = ["snappy"], optional = true } cranelift-module = { version = "0.87.0", optional = true } object_store = { version = "0.4.0", optional = true } ordered-float = "3.0" -parquet = { version = "21.0.0", optional = true, features = ["arrow"] } -pyo3 = { version = "0.16", optional = true } +parquet = { features = ["arrow"], optional = true, version = "22.0.0" } Review Comment: It seems to be a common practice to always have the version field at first ########## datafusion-examples/examples/custom_datasource.rs: ########## @@ -243,8 +243,8 @@ impl ExecutionPlan for CustomExec { db.data.values().cloned().collect() }; - let mut id_array = UInt8Builder::new(users.len()); - let mut account_array = UInt64Builder::new(users.len()); + let mut id_array = UInt8Builder::new(); Review Comment: `with_capacity` instead? ########## datafusion/core/src/physical_plan/explain.rs: ########## @@ -121,8 +121,8 @@ impl ExecutionPlan for ExplainExec { ))); } - let mut type_builder = StringBuilder::new(self.stringified_plans.len()); - let mut plan_builder = StringBuilder::new(self.stringified_plans.len()); + let mut type_builder = StringBuilder::new(); Review Comment: 👍 A lot of misuse of the previous version of the StringBuilder API: the capacity of StringBuilder is mistakenly taken as the number of items in the array. How do you think if we use `StringBuilder::with_capacity(self.stringified_plans.len(), 1024)`, seems mirror the intentions clearer. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org