Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpkg: bbox管理のちょっとした改善 #307

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

ciscorn
Copy link
Member

@ciscorn ciscorn commented Feb 20, 2024

登場したテーブルのみのbboxを管理して、gpkg_contentsを更新するようにします。(ちょっとした変更なので他の作業とは特段コンプリクトしないと思います)。

(その他、いまの main に unused imports が色々と混入しているので、除去します)

@ciscorn ciscorn requested a review from sorami February 20, 2024 15:58
@ciscorn ciscorn self-assigned this Feb 20, 2024
Comment on lines -219 to -224
tree_flattening: transformer::TreeFlatteningSpec::Flatten {
// TODO: set properly after the flattening transformer is implemented
feature: transformer::FeatureFlatteningOption::None,
data: transformer::DataFlatteningOption::None,
object: transformer::ObjectFlatteningOption::None,
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TreeFlatteningはいま壊れているようなので、gpkg sinkが動くように TreeFlatteningSpec::None にしておきます。

Comment on lines +197 to 199
for (table_name, bbox) in table_bboxes {
tx.update_bbox(&table_name, bbox.to_tuple()).await.unwrap();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ふつうの into_iter に変更

@@ -195,13 +191,11 @@ impl GpkgSink {
.await
.unwrap();

table_bboxes.get_mut(&table_name).unwrap().merge(&bbox);
table_bboxes.entry(table_name).or_default().merge(&bbox);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

必要になったテーブルのbboxだけ用意するように

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど!

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Additional details and impacted files
Components Coverage Δ
GUI ∅ <ø> (∅)
Backend 89.01% <100.00%> (-0.12%) ⬇️
Libraries 91.40% <ø> (+0.10%) ⬆️

📢 Thoughts on this report? Let us know!

@ciscorn ciscorn marked this pull request as ready for review February 20, 2024 16:08
@ciscorn ciscorn requested a review from a team February 20, 2024 16:08
Copy link
Collaborator

@nokonoko1203 nokonoko1203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビュワーに指定されていませんでしたが、朝LTで触る際についでに見ちゃいました!
LGTM!

@ciscorn ciscorn merged commit a6cea59 into main Feb 21, 2024
4 checks passed
@ciscorn ciscorn deleted the gpkg-bbox-improve branch February 21, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants