You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "FANNG1 (via GitHub)" <gi...@apache.org> on 2024/09/01 11:32:02 UTC
[PR] feat: support projection pushdown for datafusion iceberg [iceberg-rust]
FANNG1 opened a new pull request, #594:
URL: https://github.com/apache/iceberg-rust/pull/594
fixes: #592
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support projection pushdown for datafusion iceberg [iceberg-rust]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #594:
URL: https://github.com/apache/iceberg-rust/pull/594#issuecomment-2331731075
@liurenjie1024 , all comments are addressed, please help to review again, thx
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support projection pushdown for datafusion iceberg [iceberg-rust]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #594:
URL: https://github.com/apache/iceberg-rust/pull/594#discussion_r1745529020
##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -138,3 +156,18 @@ async fn get_batch_stream(
Ok(Box::pin(stream))
}
+
+fn get_column_names(schema: ArrowSchemaRef, projection: Option<&Vec<usize>>) -> Vec<String> {
Review Comment:
done
##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -116,7 +125,11 @@ impl DisplayAs for IcebergTableScan {
_t: datafusion::physical_plan::DisplayFormatType,
f: &mut std::fmt::Formatter,
) -> std::fmt::Result {
- write!(f, "IcebergTableScan")
+ write!(
+ f,
+ "IcebergTableScan projection:[{}]",
+ self.projection.join(" ")
Review Comment:
done
##########
crates/examples/src/datafusion_read_data.rs:
##########
Review Comment:
done
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support projection pushdown for datafusion iceberg [iceberg-rust]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #594:
URL: https://github.com/apache/iceberg-rust/pull/594#discussion_r1740085143
##########
crates/examples/src/datafusion_read_data.rs:
##########
@@ -0,0 +1,37 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::sync::Arc;
+
+use datafusion::prelude::SessionContext;
+use iceberg_datafusion::IcebergCatalogProvider;
+
+mod utils;
+
+#[tokio::main]
+async fn main() {
Review Comment:
A tool to read Iceberg data using datafusion SQL
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support projection pushdown for datafusion iceberg [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #594:
URL: https://github.com/apache/iceberg-rust/pull/594#discussion_r1743337943
##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -138,3 +156,18 @@ async fn get_batch_stream(
Ok(Box::pin(stream))
}
+
+fn get_column_names(schema: ArrowSchemaRef, projection: Option<&Vec<usize>>) -> Vec<String> {
Review Comment:
Why not return `None` when there is no projection? In this case we don't need to construct the whole fields
##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -116,7 +125,11 @@ impl DisplayAs for IcebergTableScan {
_t: datafusion::physical_plan::DisplayFormatType,
f: &mut std::fmt::Formatter,
) -> std::fmt::Result {
- write!(f, "IcebergTableScan")
+ write!(
+ f,
+ "IcebergTableScan projection:[{}]",
+ self.projection.join(" ")
Review Comment:
```suggestion
self.projection.join(", ")
```
##########
crates/examples/src/datafusion_read_data.rs:
##########
Review Comment:
I would suggest to move this example to another pr.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support projection pushdown for datafusion iceberg [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 merged PR #594:
URL: https://github.com/apache/iceberg-rust/pull/594
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org