Skip to content

Conversation

@Abeeujah
Copy link
Contributor

Thi Pull Request aims to address the issue where imports are duplicated, not properly sorted, Omitting only rust/sedona-geo-generic-alg/src/algorithm/line_measures/metric_spaces/euclidean/utils.rs which the import choices at the tail tests seems intentional.

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

There are a few of these that should stay put but in general this is a helpful change...thank you for taking this on!

Copy link
Member

Choose a reason for hiding this comment

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

The files in sedona-geo-generic-alg are mostly copied from another source. I think moving around the imports may make it difficult to track updates to the upstream code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought as much, I've reverted all changes, and restored it to its initial state

Comment on lines 335 to 336
use ScalarValue::*;

Copy link
Member

Choose a reason for hiding this comment

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

This should probably stay here...the wildcard imports from enums are often best kept local because they may bring a lot of common names into scope!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been restored as well


impl Display for GeoParquetColumnEncoding {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use GeoParquetColumnEncoding::*;
Copy link
Member

Choose a reason for hiding this comment

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

This one should also probably stay here (it is a wildcard import of an enum that brings a lot of names into scope)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here, I've restored this

Comment on lines 822 to 823
use std::env;
use std::path::MAIN_SEPARATOR;
Copy link
Member

Choose a reason for hiding this comment

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

These should probably stay here: function level imports under a [cfg(...)] help prevent clippy errors about unused imports when compiling on a different platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I've restored

@Abeeujah Abeeujah requested a review from paleolimbot October 17, 2025 18:12
@Abeeujah
Copy link
Contributor Author

My Bad, I didn't crosscheck rust/sedona-geoparquet/src/metadata.rs

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Thank you!

@paleolimbot paleolimbot changed the title Sort Imports chore: Sort imports to prefer module-level imports to function-level imports Oct 17, 2025
@paleolimbot paleolimbot merged commit 3d75664 into apache:main Oct 17, 2025
12 checks passed
@Abeeujah Abeeujah deleted the isort branch November 12, 2025 06:09
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.

2 participants