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

nit: Cleanup #[allow(dead_code)] from our codebase #413

Closed
Xuanwo opened this issue Jun 20, 2024 · 5 comments
Closed

nit: Cleanup #[allow(dead_code)] from our codebase #413

Xuanwo opened this issue Jun 20, 2024 · 5 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Jun 20, 2024

Most of our API should be complete now. Time to remove #[allow(dead_code)] from our codebase.

@Xuanwo Xuanwo added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 20, 2024
@liurenjie1024 liurenjie1024 moved this to Todo in iceberg-rust Jun 20, 2024
@Dysprosium0626
Copy link
Contributor

Maybe I can help with this? @Xuanwo

@Xuanwo
Copy link
Member Author

Xuanwo commented Jun 20, 2024

Maybe I can help with this? @Xuanwo

Of course, have fun!

@vivek378521
Copy link
Contributor

vivek378521 commented Jun 27, 2024

Hello @Xuanwo

I have removed the #[allow(dead_code)] from the codebase, I have raised a PR

Warnings still exist though - should I remove those functions which are not used?

#421

These are the warning functions
warning: function visitis never used --> crates/iceberg/src/avro/schema.rs:297:15 | 297 | pub(crate) fn visit<V: AvroSchemaVisitor>(schema: &AvroSchema, visitor: &mut V) -> Result<V::T> { | ^^^^^ | = note:#[warn(dead_code)]` on by default

warning: function avro_schema_to_schema is never used
--> crates/iceberg/src/avro/schema.rs:500:15
|
500 | pub(crate) fn avro_schema_to_schema(avro_schema: &AvroSchema) -> Result {
| ^^^^^^^^^^^^^^^^^^^^^

warning: field column_names is never read
--> crates/iceberg/src/scan.rs:221:5
|
217 | pub struct TableScan {
| --------- field in this struct
...
221 | column_names: Vec,
| ^^^^^^^^^^^^
|
= note: TableScan has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis

warning: field expression_evaluator is never read
--> crates/iceberg/src/expr/visitors/expression_evaluator.rs:62:5
|
60 | struct ExpressionEvaluatorVisitor<'a> {
| -------------------------- field in this struct
61 | /// Reference to an [ExpressionEvaluator].
62 | expression_evaluator: &'a ExpressionEvaluator,
| ^^^^^^^^^^^^^^^^^^^^
|
= note: ExpressionEvaluatorVisitor has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis

warning: field manifest_evaluator is never read
--> crates/iceberg/src/expr/visitors/manifest_evaluator.rs:56:5
|
55 | struct ManifestFilterVisitor<'a> {
| --------------------- field in this struct
56 | manifest_evaluator: &'a ManifestEvaluator,
| ^^^^^^^^^^^^^^^^^^

warning: iceberg (lib) generated 5 warnings`

@Dysprosium0626
Copy link
Contributor

@vivek378521 Thanks for helping!

@liurenjie1024
Copy link
Contributor

Close by #421

@github-project-automation github-project-automation bot moved this from Todo to Done in iceberg-rust Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

4 participants