Public report of Eventual-Inc/Daft, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 18:50 UTC · Survey ID cd_aece90513ee743f3ad3b7b82ecc6d230
Eventual-Inc/Daft
Measured 14 November 2026, 18:46 UTC, at code version 865feff
Test reliability is not measured: The suite could not be re-run, but the repository declares tests of its own unreliable.
CAI scoreAt riskUp 3 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 295,789 lines of product code in 84 projects, tests not counted · Estimated rebuild effort: about 2.7 person-years · Weakest lens: Production Readiness, 47
Findings by how serious they are
275 critical2034 serious372 minor
21 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 18:46 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
71of 71 dimensions measured by tools.
2577of 2681 findings point to an exact file and line, so you can open each one in the code. The other 104 concern the repository as a whole, such as missing documentation.
71dimensions across 8 lenses, read from 295,789 lines of product code in 84 projects.
Eventual-Inc/Daft is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 53 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.
Production Readiness, at 47, is the weakest lens and counts most in the score. The best first step is planning backups and recovery, worth about 4 points. Making the controls keyboard-usable comes next, worth about 3 points. Raising Production Readiness to 62 would lift the score to about 56.
165 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twenty-eight secrets can leak from the build pipeline, and twenty-eight sets of files in separate parts keep changing together, which points to hidden dependencies. Pinning each tool to an exact version, limiting each secret to its own step and making the hidden dependencies explicit would close these risks. Updating the vulnerable packages would fix the ten packages with a known security hole, and the 12 passwords or keys in the code's history need replacing, with the old ones switched off. The 12 parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.
The product code is 295,789 lines, about €390,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 47 to 62, the lowest score rated Strong, the score would rise from 53 to about 56.
Code composition: what the lines of code are
Product code 74%Tests 26%
New since the last survey: 585 findings
These 585 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Near-duplicate member family (4 members, 23 shared lines) src/daft-file/src/functions.rs
Code Duplication · Near-duplicate member family (4 members, 20 shared lines) src/daft-local-execution/src/join/inner_join.rs
Code Duplication · Near-duplicate member pair (133 shared lines) src/daft-recordbatch/src/lib.rs
Code Duplication · Near-duplicate member pair (48 shared lines) src/daft-functions-utf8/src/split_part.rs
Code Duplication · Near-duplicate member pair (40 shared lines) src/daft-io/src/gravitino.rs
Code Duplication · Near-duplicate member pair (35 shared lines) src/daft-csv/src/read.rs
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-csv/src/read.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-sql/src/modules/config.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) daft/dataframe/dataframe.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) daft/recordbatch/micropartition.py
Code Duplication · Edited copy of a member (175 corresponding lines) src/daft-writers/src/csv_writer.rs
Code Duplication · Edited copy of a member (83 corresponding lines) src/daft-core/src/datatypes/infer_datatype.rs
Code Duplication · Edited copy of a member (92 corresponding lines) src/daft-core/src/series/ops/arithmetic.rs
Code Duplication · Edited copy of a member (120 corresponding lines) src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs
Code Duplication · Edited copy of a member (45 corresponding lines) src/daft-logical-plan/src/logical_plan.rs
Code Duplication · Edited copy of a member (54 corresponding lines) src/daft-local-plan/src/plan.rs
Code Duplication · Edited copy of a member (37 corresponding lines) src/daft-core/src/lit/deserializer.rs
Code Duplication · Edited copy of a member (71 corresponding lines) src/daft-core/src/series/ops/agg.rs
Code Duplication · Edited copy of a member (75 corresponding lines) src/daft-ext-macros/src/types.rs
Code Duplication · Edited copy of a member (73 corresponding lines) src/daft-algebra/src/simplify/boolean.rs
Code Duplication · Edited copy of a member (73 corresponding lines) src/daft-json/src/local.rs
Code Duplication · Edited copy of a member (62 corresponding lines) src/daft-functions-utf8/src/left.rs
Code Duplication · Edited copy of a member (41 corresponding lines) src/daft-core/src/datatypes/infer_datatype.rs
Code Duplication · Edited copy of a member (45 corresponding lines) src/daft-functions-list/src/kernels.rs
Code Duplication · Edited copy of a member (54 corresponding lines) src/daft-scan/src/python/wrappers.rs
Code Duplication · Edited copy of a member (47 corresponding lines) src/daft-distributed/src/pipeline_node/join/asof_join.rs
Code Duplication · Edited copy of a member (20 corresponding lines) src/daft-functions/src/numeric/sign.rs
Code Duplication · Edited copy of a member (53 corresponding lines) src/daft-functions-list/src/kernels.rs
Code Duplication · Edited copy of a member (61 corresponding lines) src/daft-core/src/kernels/search_sorted.rs
Code Duplication · Edited copies of one member (3 members, 47+ corresponding lines) src/common/io-config/src/cos.rs
Code Duplication · Edited copy of a member (45 corresponding lines) src/daft-local-execution/src/join/left_right_join.rs
Code Duplication · Edited copy of a member (46 corresponding lines) src/daft-functions/src/similarity/bitwise_hamming.rs
Code Duplication · Edited copy of a member (52 corresponding lines) src/daft-csv/src/read.rs
Code Duplication · Edited copy of a member (46 corresponding lines) src/daft-sql/src/modules/temporal.rs
Code Duplication · Edited copy of a member (67 corresponding lines) src/daft-logical-plan/src/builder/mod.rs
Code Duplication · Edited copy of a member (68 corresponding lines) daft/catalog/__gravitino/_client.py
Code Duplication · Edited copy of a member (32 corresponding lines) src/daft-core/src/series/utils/python_fn.rs
Code Duplication · Edited copy of a member (31 corresponding lines) src/daft-functions/src/numeric/hypot.rs
Code Duplication · Edited copy of a member (48 corresponding lines) src/daft-logical-plan/src/optimization/rules/split_udfs.rs
Code Duplication · Edited copy of a member (49 corresponding lines) src/daft-sql/src/table_provider/read_csv.rs
Code Duplication · Edited copy of a member (58 corresponding lines) daft/recordbatch/recordbatch_io.py
Code Duplication · Edited copy of a member (31 corresponding lines) src/daft-dsl/src/expr/mod.rs
Code Duplication · Edited copy of a member (34 corresponding lines) src/daft-distributed/src/pipeline_node/sink.rs
Code Duplication · Edited copy of a member (34 corresponding lines) src/daft-core/src/kernels/hashing.rs
Code Duplication · Edited copy of a member (35 corresponding lines) src/common/image/src/cow_image.rs
Code Duplication · Edited copy of a member (33 corresponding lines) src/daft-core/src/array/ops/arithmetic.rs
Code Duplication · Edited copy of a member (27 corresponding lines) src/daft-functions/src/slice.rs
Code Duplication · Edited copy of a member (63 corresponding lines) src/daft-core/src/array/struct_array.rs
Code Duplication · Edited copy of a member (29 corresponding lines) src/daft-functions-utf8/src/regexp_extract.rs
Code Duplication · Edited copy of a member (37 corresponding lines) src/daft-local-execution/src/join/anti_semi_join.rs
Code Duplication · Edited copy of a member (32 corresponding lines) src/daft-dsl/src/python_udaf.rs
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) src/common/io-config/src/python.rs
Code Duplication · Edited copy of a member (34 corresponding lines) src/common/io-config/src/cos.rs
Code Duplication · Edited copy of a member (34 corresponding lines) src/daft-functions-temporal/src/time.rs
Code Duplication · Edited copy of a member (43 corresponding lines) src/daft-dsl/src/python.rs
Code Duplication · Edited copy of a member (32 corresponding lines) src/daft-ext-macros/src/types.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/daft-functions-list/src/kernels.rs
Code Duplication · Edited copy of a member (35 corresponding lines) src/daft-ext-macros/src/types.rs
Code Duplication · Edited copy of a member (25 corresponding lines) src/daft-functions-temporal/src/date_arithmetic.rs
Code Duplication · Edited copy of a member (37 corresponding lines) src/daft-distributed/src/pipeline_node/shuffles/gather.rs
Code Duplication · Edited copy of a member (41 corresponding lines) daft/dataframe/dataframe.py
Code Duplication · Edited copy of a member (45 corresponding lines) src/daft-io/src/http.rs
Code Duplication · Edited copy of a member (36 corresponding lines) src/daft-dsl/src/python_udf/retry.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/daft-functions-binary/src/decode.rs
Code Duplication · Edited copy of a member (27 corresponding lines) src/daft-functions-utf8/src/find.rs
Code Duplication · Edited copy of a member (29 corresponding lines) src/daft-writers/src/batch_file_writer.rs
Code Duplication · Edited copy of a member (39 corresponding lines) src/daft-writers/src/csv_writer.rs
Code Duplication · Edited copy of a member (22 corresponding lines) src/daft-functions-utf8/src/split_part.rs
Code Duplication · Edited copy of a member (32 corresponding lines) src/daft-sql/src/modules/window.rs
Code Duplication · Edited copy of a member (26 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs
Code Duplication · Edited copy of a member (38 corresponding lines) src/daft-sql/src/modules/temporal.rs
Code Duplication · Edited copy of a member (32 corresponding lines) src/common/io-config/src/gcs.rs
Code Duplication · Edited copy of a member (29 corresponding lines) src/daft-functions-temporal/src/date_navigation.rs
Code Duplication · Edited copy of a member (17 corresponding lines) src/daft-algebra/src/simplify/numeric.rs
Code Duplication · Edited copy of a member (25 corresponding lines) src/daft-core/src/array/struct_array.rs
Code Duplication · Edited copy of a member (25 corresponding lines) src/daft-recordbatch/src/lib.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/daft-functions-utf8/src/regexp_extract.rs
Code Duplication · Edited copy of a member (32 corresponding lines) src/daft-parquet/src/python.rs
Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) src/common/io-config/src/python.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs
Code Duplication · Edited copy of a member (25 corresponding lines) src/daft-io/src/gravitino.rs
Code Duplication · Edited copy of a member (24 corresponding lines) src/daft-sql/src/modules/temporal.rs
Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs
Code Duplication · Edited copy of a member (20 corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/daft-distributed/src/scheduling/scheduler/default.rs
Code Duplication · Edited copy of a member (33 corresponding lines) src/daft-distributed/src/scheduling/task.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/common/io-config/src/python.rs
Code Duplication · Edited copy of a member (21 corresponding lines) daft/udf/execution.py
Code Duplication · Edited copy of a member (27 corresponding lines) src/daft-sql/src/modules/temporal.rs
Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs
Code Duplication · Edited copy of a member (20 corresponding lines) src/daft-functions-binary/src/encode.rs
Code Duplication · Edited copy of a member (30 corresponding lines) src/daft-io/src/google_cloud.rs
Code Duplication · Edited copy of a member (35 corresponding lines) src/daft-io/src/s3_like.rs
Code Duplication · Edited copy of a member (21 corresponding lines) src/daft-micropartition/src/python.rs
Code Duplication · Edited copy of a member (16 corresponding lines) src/daft-core/src/array/ops/comparison.rs
Code Duplication · Edited copy of a member (22 corresponding lines) src/common/io-config/src/gravitino.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/daft-dsl/src/functions/partitioning/evaluators.rs
Code Duplication · Edited copy of a member (32 corresponding lines) src/daft-micropartition/src/python.rs
Code Duplication · Edited copy of a member (26 corresponding lines) src/daft-dsl/src/python_udf/batch.rs
Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) src/daft-local-execution/src/sinks/window_order_by_only.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 134 findings
These 134 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.
€130,000 to €640,000, for 2,135 to 6,773 hours of work, about 2.7 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 295,789 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 finding(s) in DR & Backup.
Raises the score by about 4 points · Medium effort · DR & Backup
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €390,000 to build again, about 2.7 person-years of work. Its weakest lens is Production Readiness, at 47 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 finding(s) in DR & Backup. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort, because it clears the 1 DR & Backup findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 6% on every change. The history of the code shows how much it changes: about 27,052 lines over the last 90 days, which is about 109,711 lines a year. At that pace, the extra work comes to an estimated 6.8 to 40.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
1072 modules, with 2871 dependencies between them. 19 loops run through 84 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 1032 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
common_daft_config uses common_io_config.config, so a change to common_io_config.config can break common_daft_config, while a change to common_daft_config can't break common_io_config.config.
Position
Below the diagonal: common_daft_config uses a module listed above it, which is the healthy direction.
common_metrics.snapshot uses common_metrics, so a change to common_metrics can break common_metrics.snapshot, while a change to common_metrics.snapshot can't break common_metrics.
Position
Below the diagonal: common_metrics.snapshot uses a module listed above it, which is the healthy direction.
daft.expressions.expressions uses daft.schema, so a change to daft.schema can break daft.expressions.expressions, while a change to daft.expressions.expressions can't break daft.schema.
Position
Below the diagonal: daft.expressions.expressions uses a module listed above it, which is the healthy direction.
daft_io uses common_io_config.config, so a change to common_io_config.config can break daft_io, while a change to daft_io can't break common_io_config.config.
Position
Below the diagonal: daft_io uses a module listed above it, which is the healthy direction.
13→17 daft_schema.field uses daft_schema.dtypepart of a loop✕
Connections
1 pair of types, where a type in daft_schema.field uses a type in daft_schema.dtype.
daft_schema.field uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_schema.field, while a change to daft_schema.field can't break daft_schema.dtype.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
daft.dataframe.dataframe uses daft.schema, so a change to daft.schema can break daft.dataframe.dataframe, while a change to daft.dataframe.dataframe can't break daft.schema.
Position
Below the diagonal: daft.dataframe.dataframe uses a module listed above it, which is the healthy direction.
daft.dataframe.dataframe uses daft.expressions.expressions, so a change to daft.expressions.expressions can break daft.dataframe.dataframe, while a change to daft.dataframe.dataframe can't break daft.expressions.expressions.
Position
Below the diagonal: daft.dataframe.dataframe uses a module listed above it, which is the healthy direction.
daft.recordbatch.micropartition uses daft.schema, so a change to daft.schema can break daft.recordbatch.micropartition, while a change to daft.recordbatch.micropartition can't break daft.schema.
Position
Below the diagonal: daft.recordbatch.micropartition uses a module listed above it, which is the healthy direction.
daft.recordbatch.micropartition uses daft.expressions.expressions, so a change to daft.expressions.expressions can break daft.recordbatch.micropartition, while a change to daft.recordbatch.micropartition can't break daft.expressions.expressions.
Position
Below the diagonal: daft.recordbatch.micropartition uses a module listed above it, which is the healthy direction.
daft_distributed.plan.runner uses common_daft_config, so a change to common_daft_config can break daft_distributed.plan.runner, while a change to daft_distributed.plan.runner can't break common_daft_config.
Position
Below the diagonal: daft_distributed.plan.runner uses a module listed above it, which is the healthy direction.
16→33 daft_distributed.plan.runner uses daft_distributed.pipeline_nodepart of a loop✕
Connections
2 pairs of types, where a type in daft_distributed.plan.runner uses a type in daft_distributed.pipeline_node.
daft_distributed.plan.runner uses daft_distributed.pipeline_node, so a change to daft_distributed.pipeline_node can break daft_distributed.plan.runner, while a change to daft_distributed.plan.runner can't break daft_distributed.pipeline_node.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
daft_schema.dtype uses daft_schema.field, so a change to daft_schema.field can break daft_schema.dtype, while a change to daft_schema.dtype can't break daft_schema.field.
Position
Below the diagonal: daft_schema.dtype uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in daft_core.series uses a type in daft_schema.field.
The types involved
daft_core.series.Series → daft_schema.field.Field
Direction
daft_core.series uses daft_schema.field, so a change to daft_schema.field can break daft_core.series, while a change to daft_core.series can't break daft_schema.field.
Position
Below the diagonal: daft_core.series uses a module listed above it, which is the healthy direction.
daft_core.series uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_core.series, while a change to daft_core.series can't break daft_schema.dtype.
Position
Below the diagonal: daft_core.series uses a module listed above it, which is the healthy direction.
18→20 daft_core.series uses daft_core.litpart of a loop✕
Connections
1 pair of types, where a type in daft_core.series uses a type in daft_core.lit.
The types involved
daft_core.series.Series → daft_core.lit.Literal
Direction
daft_core.series uses daft_core.lit, so a change to daft_core.lit can break daft_core.series, while a change to daft_core.series can't break daft_core.lit.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18→24 daft_core.series uses daft_core.count_modepart of a loop✕
Connections
1 pair of types, where a type in daft_core.series uses a type in daft_core.count_mode.
daft_core.series uses daft_core.count_mode, so a change to daft_core.count_mode can break daft_core.series, while a change to daft_core.series can't break daft_core.count_mode.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
daft_schema.schema uses daft_schema.field, so a change to daft_schema.field can break daft_schema.schema, while a change to daft_schema.schema can't break daft_schema.field.
Position
Below the diagonal: daft_schema.schema uses a module listed above it, which is the healthy direction.
daft_schema.schema uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_schema.schema, while a change to daft_schema.schema can't break daft_schema.dtype.
Position
Below the diagonal: daft_schema.schema uses a module listed above it, which is the healthy direction.
daft_core.lit uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_core.lit, while a change to daft_core.lit can't break daft_schema.dtype.
Position
Below the diagonal: daft_core.lit uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in daft_core.lit uses a type in daft_core.series.
The types involved
daft_core.lit.Literal → daft_core.series.Series
Direction
daft_core.lit uses daft_core.series, so a change to daft_core.series can break daft_core.lit, while a change to daft_core.lit can't break daft_core.series.
Position
Below the diagonal: daft_core.lit uses a module listed above it, which is the healthy direction.
daft_dsl.functions uses daft_schema.field, so a change to daft_schema.field can break daft_dsl.functions, while a change to daft_dsl.functions can't break daft_schema.field.
Position
Below the diagonal: daft_dsl.functions uses a module listed above it, which is the healthy direction.
daft_dsl.functions uses daft_schema.schema, so a change to daft_schema.schema can break daft_dsl.functions, while a change to daft_dsl.functions can't break daft_schema.schema.
Position
Below the diagonal: daft_dsl.functions uses a module listed above it, which is the healthy direction.
daft_dsl.functions.scalar uses daft_dsl.functions.function_args, so a change to daft_dsl.functions.function_args can break daft_dsl.functions.scalar, while a change to daft_dsl.functions.scalar can't break daft_dsl.functions.function_args.
Position
Below the diagonal: daft_dsl.functions.scalar uses a module listed above it, which is the healthy direction.
daft_dsl.functions.scalar uses daft_schema.field, so a change to daft_schema.field can break daft_dsl.functions.scalar, while a change to daft_dsl.functions.scalar can't break daft_schema.field.
Position
Below the diagonal: daft_dsl.functions.scalar uses a module listed above it, which is the healthy direction.
daft_dsl.functions.scalar uses daft_schema.schema, so a change to daft_schema.schema can break daft_dsl.functions.scalar, while a change to daft_dsl.functions.scalar can't break daft_schema.schema.
Position
Below the diagonal: daft_dsl.functions.scalar uses a module listed above it, which is the healthy direction.
daft_scan.pushdowns uses daft_schema.schema, so a change to daft_schema.schema can break daft_scan.pushdowns, while a change to daft_scan.pushdowns can't break daft_schema.schema.
Position
Below the diagonal: daft_scan.pushdowns uses a module listed above it, which is the healthy direction.
daft_core.count_mode uses daft_core.lit, so a change to daft_core.lit can break daft_core.count_mode, while a change to daft_core.count_mode can't break daft_core.lit.
Position
Below the diagonal: daft_core.count_mode uses a module listed above it, which is the healthy direction.
daft_core.array uses daft_schema.field, so a change to daft_schema.field can break daft_core.array, while a change to daft_core.array can't break daft_schema.field.
Position
Below the diagonal: daft_core.array uses a module listed above it, which is the healthy direction.
daft_core.array uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_core.array, while a change to daft_core.array can't break daft_schema.dtype.
Position
Below the diagonal: daft_core.array uses a module listed above it, which is the healthy direction.
daft_core.array uses daft_core.series, so a change to daft_core.series can break daft_core.array, while a change to daft_core.array can't break daft_core.series.
Position
Below the diagonal: daft_core.array uses a module listed above it, which is the healthy direction.
daft_core.array uses daft_core.count_mode, so a change to daft_core.count_mode can break daft_core.array, while a change to daft_core.array can't break daft_core.count_mode.
Position
Below the diagonal: daft_core.array uses a module listed above it, which is the healthy direction.
daft_dsl.expr uses daft_schema.field, so a change to daft_schema.field can break daft_dsl.expr, while a change to daft_dsl.expr can't break daft_schema.field.
Position
Below the diagonal: daft_dsl.expr uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in daft_dsl.expr uses a type in daft_schema.dtype.
The types involved
daft_dsl.expr.Expr → daft_schema.dtype.DataType
Direction
daft_dsl.expr uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_dsl.expr, while a change to daft_dsl.expr can't break daft_schema.dtype.
Position
Below the diagonal: daft_dsl.expr uses a module listed above it, which is the healthy direction.
daft_dsl.expr uses daft_schema.schema, so a change to daft_schema.schema can break daft_dsl.expr, while a change to daft_dsl.expr can't break daft_schema.schema.
Position
Below the diagonal: daft_dsl.expr uses a module listed above it, which is the healthy direction.
daft_dsl.expr uses daft_core.count_mode, so a change to daft_core.count_mode can break daft_dsl.expr, while a change to daft_dsl.expr can't break daft_core.count_mode.
Position
Below the diagonal: daft_dsl.expr uses a module listed above it, which is the healthy direction.
26→27 daft_dsl.expr uses daft_dsl.expr.bound_exprpart of a loop✕
Connections
3 pairs of types, where a type in daft_dsl.expr uses a type in daft_dsl.expr.bound_expr.
daft_dsl.expr uses daft_dsl.expr.bound_expr, so a change to daft_dsl.expr.bound_expr can break daft_dsl.expr, while a change to daft_dsl.expr can't break daft_dsl.expr.bound_expr.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
daft_dsl.expr.bound_expr uses daft_schema.schema, so a change to daft_schema.schema can break daft_dsl.expr.bound_expr, while a change to daft_dsl.expr.bound_expr can't break daft_schema.schema.
Position
Below the diagonal: daft_dsl.expr.bound_expr uses a module listed above it, which is the healthy direction.
daft_dsl.expr.bound_expr uses daft_dsl.expr, so a change to daft_dsl.expr can break daft_dsl.expr.bound_expr, while a change to daft_dsl.expr.bound_expr can't break daft_dsl.expr.
Position
Below the diagonal: daft_dsl.expr.bound_expr uses a module listed above it, which is the healthy direction.
daft_logical_plan.logical_plan uses daft_logical_plan.stats, so a change to daft_logical_plan.stats can break daft_logical_plan.logical_plan, while a change to daft_logical_plan.logical_plan can't break daft_logical_plan.stats.
Position
Below the diagonal: daft_logical_plan.logical_plan uses a module listed above it, which is the healthy direction.
daft_logical_plan.logical_plan uses common_daft_config, so a change to common_daft_config can break daft_logical_plan.logical_plan, while a change to daft_logical_plan.logical_plan can't break common_daft_config.
Position
Below the diagonal: daft_logical_plan.logical_plan uses a module listed above it, which is the healthy direction.
daft_logical_plan.logical_plan uses daft_dsl.expr, so a change to daft_dsl.expr can break daft_logical_plan.logical_plan, while a change to daft_logical_plan.logical_plan can't break daft_dsl.expr.
Position
Below the diagonal: daft_logical_plan.logical_plan uses a module listed above it, which is the healthy direction.
daft_local_plan.plan uses common_io_config.config, so a change to common_io_config.config can break daft_local_plan.plan, while a change to daft_local_plan.plan can't break common_io_config.config.
Position
Below the diagonal: daft_local_plan.plan uses a module listed above it, which is the healthy direction.
42 pairs of types, where a type in daft_local_plan.plan uses a type in daft_logical_plan.stats. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
daft_local_plan.plan uses daft_logical_plan.stats, so a change to daft_logical_plan.stats can break daft_local_plan.plan, while a change to daft_local_plan.plan can't break daft_logical_plan.stats.
Position
Below the diagonal: daft_local_plan.plan uses a module listed above it, which is the healthy direction.
daft_local_plan.plan uses daft_scan.pushdowns, so a change to daft_scan.pushdowns can break daft_local_plan.plan, while a change to daft_local_plan.plan can't break daft_scan.pushdowns.
Position
Below the diagonal: daft_local_plan.plan uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in daft_local_plan.plan uses a type in daft_dsl.expr.bound_expr. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
daft_local_plan.plan uses daft_dsl.expr.bound_expr, so a change to daft_dsl.expr.bound_expr can break daft_local_plan.plan, while a change to daft_local_plan.plan can't break daft_dsl.expr.bound_expr.
Position
Below the diagonal: daft_local_plan.plan uses a module listed above it, which is the healthy direction.
daft_logical_plan.builder uses common_io_config.config, so a change to common_io_config.config can break daft_logical_plan.builder, while a change to daft_logical_plan.builder can't break common_io_config.config.
Position
Below the diagonal: daft_logical_plan.builder uses a module listed above it, which is the healthy direction.
daft_logical_plan.builder uses common_daft_config, so a change to common_daft_config can break daft_logical_plan.builder, while a change to daft_logical_plan.builder can't break common_daft_config.
Position
Below the diagonal: daft_logical_plan.builder uses a module listed above it, which is the healthy direction.
daft_logical_plan.builder uses daft_schema.schema, so a change to daft_schema.schema can break daft_logical_plan.builder, while a change to daft_logical_plan.builder can't break daft_schema.schema.
Position
Below the diagonal: daft_logical_plan.builder uses a module listed above it, which is the healthy direction.
daft_logical_plan.builder uses daft_scan.pushdowns, so a change to daft_scan.pushdowns can break daft_logical_plan.builder, while a change to daft_logical_plan.builder can't break daft_scan.pushdowns.
Position
Below the diagonal: daft_logical_plan.builder uses a module listed above it, which is the healthy direction.
daft_logical_plan.builder uses daft_logical_plan.logical_plan, so a change to daft_logical_plan.logical_plan can break daft_logical_plan.builder, while a change to daft_logical_plan.builder can't break daft_logical_plan.logical_plan.
Position
Below the diagonal: daft_logical_plan.builder uses a module listed above it, which is the healthy direction.
daft_logical_plan.optimization.rules.rule uses daft_logical_plan.logical_plan, so a change to daft_logical_plan.logical_plan can break daft_logical_plan.optimization.rules.rule, while a change to daft_logical_plan.optimization.rules.rule can't break daft_logical_plan.logical_plan.
Position
Below the diagonal: daft_logical_plan.optimization.rules.rule uses a module listed above it, which is the healthy direction.
daft_recordbatch uses daft_schema.field, so a change to daft_schema.field can break daft_recordbatch, while a change to daft_recordbatch can't break daft_schema.field.
Position
Below the diagonal: daft_recordbatch uses a module listed above it, which is the healthy direction.
daft_recordbatch uses daft_schema.dtype, so a change to daft_schema.dtype can break daft_recordbatch, while a change to daft_recordbatch can't break daft_schema.dtype.
Position
Below the diagonal: daft_recordbatch uses a module listed above it, which is the healthy direction.
daft_recordbatch uses daft_core.series, so a change to daft_core.series can break daft_recordbatch, while a change to daft_recordbatch can't break daft_core.series.
Position
Below the diagonal: daft_recordbatch uses a module listed above it, which is the healthy direction.
daft_recordbatch uses daft_schema.schema, so a change to daft_schema.schema can break daft_recordbatch, while a change to daft_recordbatch can't break daft_schema.schema.
Position
Below the diagonal: daft_recordbatch uses a module listed above it, which is the healthy direction.
daft_recordbatch uses daft_dsl.expr.bound_expr, so a change to daft_dsl.expr.bound_expr can break daft_recordbatch, while a change to daft_recordbatch can't break daft_dsl.expr.bound_expr.
Position
Below the diagonal: daft_recordbatch uses a module listed above it, which is the healthy direction.
daft_distributed.pipeline_node uses common_metrics.meters, so a change to common_metrics.meters can break daft_distributed.pipeline_node, while a change to daft_distributed.pipeline_node can't break common_metrics.meters.
Position
Below the diagonal: daft_distributed.pipeline_node uses a module listed above it, which is the healthy direction.
daft_distributed.pipeline_node uses common_metrics.ops, so a change to common_metrics.ops can break daft_distributed.pipeline_node, while a change to daft_distributed.pipeline_node can't break common_metrics.ops.
Position
Below the diagonal: daft_distributed.pipeline_node uses a module listed above it, which is the healthy direction.
daft_distributed.pipeline_node uses common_daft_config, so a change to common_daft_config can break daft_distributed.pipeline_node, while a change to daft_distributed.pipeline_node can't break common_daft_config.
Position
Below the diagonal: daft_distributed.pipeline_node uses a module listed above it, which is the healthy direction.
daft_distributed.pipeline_node uses daft_distributed.plan.runner, so a change to daft_distributed.plan.runner can break daft_distributed.pipeline_node, while a change to daft_distributed.pipeline_node can't break daft_distributed.plan.runner.
Position
Below the diagonal: daft_distributed.pipeline_node uses a module listed above it, which is the healthy direction.
daft_distributed.pipeline_node uses daft_local_plan.plan, so a change to daft_local_plan.plan can break daft_distributed.pipeline_node, while a change to daft_distributed.pipeline_node can't break daft_local_plan.plan.
Position
Below the diagonal: daft_distributed.pipeline_node uses a module listed above it, which is the healthy direction.
daft_local_execution.pipeline uses common_metrics.meters, so a change to common_metrics.meters can break daft_local_execution.pipeline, while a change to daft_local_execution.pipeline can't break common_metrics.meters.
Position
Below the diagonal: daft_local_execution.pipeline uses a module listed above it, which is the healthy direction.
daft_local_execution.pipeline uses common_metrics.ops, so a change to common_metrics.ops can break daft_local_execution.pipeline, while a change to daft_local_execution.pipeline can't break common_metrics.ops.
Position
Below the diagonal: daft_local_execution.pipeline uses a module listed above it, which is the healthy direction.
daft_local_execution.pipeline uses daft_local_execution, so a change to daft_local_execution can break daft_local_execution.pipeline, while a change to daft_local_execution.pipeline can't break daft_local_execution.
Position
Below the diagonal: daft_local_execution.pipeline uses a module listed above it, which is the healthy direction.
daft_local_execution.pipeline uses common_daft_config, so a change to common_daft_config can break daft_local_execution.pipeline, while a change to daft_local_execution.pipeline can't break common_daft_config.
Position
Below the diagonal: daft_local_execution.pipeline uses a module listed above it, which is the healthy direction.
daft_local_execution.pipeline uses daft_dsl.expr.bound_expr, so a change to daft_dsl.expr.bound_expr can break daft_local_execution.pipeline, while a change to daft_local_execution.pipeline can't break daft_dsl.expr.bound_expr.
Position
Below the diagonal: daft_local_execution.pipeline uses a module listed above it, which is the healthy direction.
daft_local_execution.pipeline uses daft_local_plan.plan, so a change to daft_local_plan.plan can break daft_local_execution.pipeline, while a change to daft_local_execution.pipeline can't break daft_local_plan.plan.
Position
Below the diagonal: daft_local_execution.pipeline uses a module listed above it, which is the healthy direction.
daft_micropartition.micropartition uses common_io_config.config, so a change to common_io_config.config can break daft_micropartition.micropartition, while a change to daft_micropartition.micropartition can't break common_io_config.config.
Position
Below the diagonal: daft_micropartition.micropartition uses a module listed above it, which is the healthy direction.
daft_micropartition.micropartition uses daft_io, so a change to daft_io can break daft_micropartition.micropartition, while a change to daft_micropartition.micropartition can't break daft_io.
Position
Below the diagonal: daft_micropartition.micropartition uses a module listed above it, which is the healthy direction.
daft_micropartition.micropartition uses daft_schema.schema, so a change to daft_schema.schema can break daft_micropartition.micropartition, while a change to daft_micropartition.micropartition can't break daft_schema.schema.
Position
Below the diagonal: daft_micropartition.micropartition uses a module listed above it, which is the healthy direction.
daft_micropartition.micropartition uses daft_dsl.expr, so a change to daft_dsl.expr can break daft_micropartition.micropartition, while a change to daft_micropartition.micropartition can't break daft_dsl.expr.
Position
Below the diagonal: daft_micropartition.micropartition uses a module listed above it, which is the healthy direction.
daft_micropartition.micropartition uses daft_dsl.expr.bound_expr, so a change to daft_dsl.expr.bound_expr can break daft_micropartition.micropartition, while a change to daft_micropartition.micropartition can't break daft_dsl.expr.bound_expr.
Position
Below the diagonal: daft_micropartition.micropartition uses a module listed above it, which is the healthy direction.
daft_micropartition.micropartition uses daft_recordbatch, so a change to daft_recordbatch can break daft_micropartition.micropartition, while a change to daft_micropartition.micropartition can't break daft_recordbatch.
Position
Below the diagonal: daft_micropartition.micropartition uses a module listed above it, which is the healthy direction.
daft_sql.planner uses daft_dsl.functions.function_args, so a change to daft_dsl.functions.function_args can break daft_sql.planner, while a change to daft_sql.planner can't break daft_dsl.functions.function_args.
Position
Below the diagonal: daft_sql.planner uses a module listed above it, which is the healthy direction.
daft_sql.planner uses daft_dsl.expr, so a change to daft_dsl.expr can break daft_sql.planner, while a change to daft_sql.planner can't break daft_dsl.expr.
Position
Below the diagonal: daft_sql.planner uses a module listed above it, which is the healthy direction.
daft_sql.planner uses daft_logical_plan.builder, so a change to daft_logical_plan.builder can break daft_sql.planner, while a change to daft_sql.planner can't break daft_logical_plan.builder.
Position
Below the diagonal: daft_sql.planner uses a module listed above it, which is the healthy direction.
daft_distributed.scheduling.task uses common_daft_config, so a change to common_daft_config can break daft_distributed.scheduling.task, while a change to daft_distributed.scheduling.task can't break common_daft_config.
Position
Below the diagonal: daft_distributed.scheduling.task uses a module listed above it, which is the healthy direction.
daft_distributed.scheduling.task uses daft_distributed.plan.runner, so a change to daft_distributed.plan.runner can break daft_distributed.scheduling.task, while a change to daft_distributed.scheduling.task can't break daft_distributed.plan.runner.
Position
Below the diagonal: daft_distributed.scheduling.task uses a module listed above it, which is the healthy direction.
daft_distributed.scheduling.task uses daft_local_plan.plan, so a change to daft_local_plan.plan can break daft_distributed.scheduling.task, while a change to daft_distributed.scheduling.task can't break daft_local_plan.plan.
Position
Below the diagonal: daft_distributed.scheduling.task uses a module listed above it, which is the healthy direction.
daft_distributed.scheduling.task uses daft_distributed.pipeline_node, so a change to daft_distributed.pipeline_node can break daft_distributed.scheduling.task, while a change to daft_distributed.scheduling.task can't break daft_distributed.pipeline_node.
Position
Below the diagonal: daft_distributed.scheduling.task uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses common_metrics, so a change to common_metrics can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break common_metrics.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses common_metrics.meters, so a change to common_metrics.meters can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break common_metrics.meters.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses common_metrics.ops, so a change to common_metrics.ops can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break common_metrics.ops.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses daft_local_execution, so a change to daft_local_execution can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break daft_local_execution.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses daft_logical_plan.stats, so a change to daft_logical_plan.stats can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break daft_logical_plan.stats.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses daft_local_plan.plan, so a change to daft_local_plan.plan can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break daft_local_plan.plan.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses daft_local_execution.pipeline, so a change to daft_local_execution.pipeline can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break daft_local_execution.pipeline.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.intermediate_ops.intermediate_op uses daft_micropartition.micropartition, so a change to daft_micropartition.micropartition can break daft_local_execution.intermediate_ops.intermediate_op, while a change to daft_local_execution.intermediate_ops.intermediate_op can't break daft_micropartition.micropartition.
Position
Below the diagonal: daft_local_execution.intermediate_ops.intermediate_op uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses common_metrics, so a change to common_metrics can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break common_metrics.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses common_metrics.meters, so a change to common_metrics.meters can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break common_metrics.meters.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses common_metrics.ops, so a change to common_metrics.ops can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break common_metrics.ops.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses daft_local_execution, so a change to daft_local_execution can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break daft_local_execution.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses daft_logical_plan.stats, so a change to daft_logical_plan.stats can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break daft_logical_plan.stats.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses daft_local_plan.plan, so a change to daft_local_plan.plan can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break daft_local_plan.plan.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses daft_local_execution.pipeline, so a change to daft_local_execution.pipeline can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break daft_local_execution.pipeline.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.sinks.blocking_sink uses daft_micropartition.micropartition, so a change to daft_micropartition.micropartition can break daft_local_execution.sinks.blocking_sink, while a change to daft_local_execution.sinks.blocking_sink can't break daft_micropartition.micropartition.
Position
Below the diagonal: daft_local_execution.sinks.blocking_sink uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses common_metrics, so a change to common_metrics can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break common_metrics.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses common_metrics.meters, so a change to common_metrics.meters can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break common_metrics.meters.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses common_metrics.ops, so a change to common_metrics.ops can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break common_metrics.ops.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses daft_local_execution, so a change to daft_local_execution can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break daft_local_execution.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses daft_logical_plan.stats, so a change to daft_logical_plan.stats can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break daft_logical_plan.stats.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses daft_local_plan.plan, so a change to daft_local_plan.plan can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break daft_local_plan.plan.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses daft_local_execution.pipeline, so a change to daft_local_execution.pipeline can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break daft_local_execution.pipeline.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses daft_micropartition.micropartition, so a change to daft_micropartition.micropartition can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break daft_micropartition.micropartition.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
daft_local_execution.streaming_sink.base uses daft_local_execution.sinks.blocking_sink, so a change to daft_local_execution.sinks.blocking_sink can break daft_local_execution.streaming_sink.base, while a change to daft_local_execution.streaming_sink.base can't break daft_local_execution.sinks.blocking_sink.
Position
Below the diagonal: daft_local_execution.streaming_sink.base uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 59% · Adequate · gated by R7 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
217
High / Critical
A03:2025 — Software Supply Chain Failures
52
High / Critical
A07:2025 — Authentication Failures
13
High / Critical
A02:2025 — Security Misconfiguration
13
High / Critical
Roadmap
Top priorities: Resolve the 1 finding(s) in DR & Backup; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 275
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 2034
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 372
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 21
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 71 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 71 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 2577 of 2681 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Rust half could not be measured — the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (codecov.yml) and a coverage step in CI (`cargo llvm-cov`) shows coverage is measured in your own CI.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository declares 1 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.py, .rs), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python REDACTED/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `src/daft-dashboard/frontend/tailwind.config.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D41 Kernel & Syscall Confinement — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. K8s/charts/quickstart/templates/head-deployment.yaml:3, REDACTED:2, k8s/charts/quickstart/templates/worker-deployment.yaml:3 did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X29 Per-element action decided by a fixed element — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
113 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SQLPlanner::plan_expr at 136. A further 65 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being daft_core::datatypes::infer_datatype::try_numeric_supertype::inner at 67 — they are counted neither in the figure above nor in this dimension's score. 23 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/daft-local-plan/src/plan.rs (LocalPhysicalPlan::with_new_children at 48), src/daft-core/src/series/serdes.rs (Series::deserialize at 44), src/daft-recordbatch/src/repr_html.rs (daft_recordbatch::repr_html::html_value at 39), src/daft-core/src/lit/deserializer.rs (LiteralDeserializer::deserialize_any at 32), src/daft-logical-plan/src/display/json.rs (daft_logical_plan::display::json::to_json_value at 32), and 18 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 77 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with SQLPlanner::plan_expr (cyclomatic 136), daft_core::utils::supertype::get_supertype::inner (cyclomatic 125), daft_local_execution::pipeline::physical_plan_to_pipeline (cyclomatic 81). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 152 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 11 bodies over 60 down to 60 or less in Cognitive Complexity — start with GlobScanOperator::try_new (cognitive 100), PushDownFilter::try_optimize_node (cognitive 89), daft_io::object_store_glob::glob::visit (cognitive 78). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 11 together lifts Cognitive Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 52 FileTooLong finding(s) in God Classes — start with python.rs (5), mod.rs (2), lib.rs (2). — One of this dimension's main actionable groups (52 warning-level).
Resolve the 40 MethodTooLong finding(s) in God Classes — start with mod.rs (7), lib.rs (3), python.rs (3). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 29 TooManyMethods finding(s) in God Classes — start with mod.rs (5), python.rs (5), series.py (2). — One of this dimension's main actionable groups (29 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
543 duplicated block group(s) detected. 8.9 % of the production lines (26,230 of 295,789) are in a reported copy. A further 453 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 1 of the 996 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 254 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 41 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with python.rs (3), engine.rs (2), asof_join.rs (2). — One of this dimension's main actionable groups (41 warning-level).
Resolve the 37 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with python.rs (4), local.rs (2), arrow.rs (2). — One of this dimension's main actionable groups (37 warning-level).
Resolve the 36 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with python.rs (4), infer_datatype.rs (3), write.rs (2). — One of this dimension's main actionable groups (36 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.9 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
84 production modules (Cargo+npm+Python), 0 dependency cycle(s), 6 unstable depended-on module(s). Read from the build's own module declarations; 14 module(s) off the main sequence, with abstractness counted on 73 of the 84 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: hyperloglog · ×4
Unstable project daft-distributed
Unstable project daft-functions-tokenize
Unstable project daft-local-execution
Unstable project daft-local-plan
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Unstable project daft-distributed finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project daft-functions-tokenize finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with window.rs, mod.rs, write.rs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
50 outdated, 0 yanked direct Cargo dependencies. 144 of 156 direct crates were graded against crates.io (0 not published there, 12 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: aho-corasick · ×50
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 779 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python REDACTED/requirements.txt (pip/uv/Poetry), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with planner.rs, dataframe.py, glob.rs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.6 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
34 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/daft-recordbatch/src/ops/inline_agg.rs. Counted over 920 of the 1372 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×7
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
361 deducted task-comment markers across 295789 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 349 TodoComment finding(s) in Explicit Debt — start with mod.rs (22), test_image.py (14), lib.rs (11). — One of this dimension's main actionable groups (349 warning-level).
Resolve the 10 HackComment finding(s) in Explicit Debt — start with REDACTED (4), test_s3_credentials_refresh.py, aggs.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with mod.rs (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 136 document(s) read across 2 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
2 of 66 judged comments only repeat the code they sit on (3.0 %). 2 comment(s) in another language or script were not judged.
redundant comment · ×2docs/js/custom.js:23
What to do
Resolve the 2 redundant comment finding(s) in Comment Value — start with custom.js, sidebar.tsx. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
12 finding(s): 0 critical, 12 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 12 REDACTED finding(s) in Secrets (history) — start with REDACTED (8), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (12 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
218 finding(s): 0 critical, 204 high, 7 medium, 7 low. 163 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 12 file(s) — `docs/overrides/partials/header.html` (lines 24–29), `docs/overrides/partials/nav-item.html` (lines 24–28, line 36, lines 38–48, …), `k8s/charts/quickstart/templates/head-deployment.yaml`, `k8s/charts/quickstart/templates/head-service.yaml`, `k8s/charts/quickstart/templates/job-script-configmap.yaml`, … (+7 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 6 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (14), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (27 issue-level).
Resolve the 2 REDACTED finding(s) charged to Static Analysis (SAST) — the other 163 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (165 issue-level, 2 of them charged here).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 23 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (23). — One of this dimension's main actionable groups (23 warning-level).
Resolve the 9 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
224 of 920 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/common/treenode/src/lib.rs. Counted over 920 of the 1372 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 212 Orphaned file finding(s) in Knowledge Freshness — start with python.rs (6), lib.rs (4), mod.rs (4). — One of this dimension's main actionable groups (212 recommendation-level).
Resolve the 12 Orphaned knowledge finding(s) in Knowledge Freshness — start with lib.rs, state.rs, infer_datatype.rs. — One of this dimension's main actionable groups (12 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 28 Boundary-crossing change coupling finding(s) in Change Coupling — start with translate.rs (4), pipeline.rs (3), series.py (3). — One of this dimension's main actionable groups (28 issue-level).
Resolve the 22 Change coupling finding(s) in Change Coupling — start with mod.rs (2), worker_manager.rs (2), batch.rs. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 5 Change-coupling hub finding(s) in Change Coupling — start with drop_repartition.rs, source.rs, run.rs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 7 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component. — src/daft-dashboard/frontend/src/app/layout.tsx:18
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×3) — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:187, src/daft-dashboard/frontend/src/app/query/plan-visualizer.tsx:55, src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:547
This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×2) — src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:374, src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:483
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
<div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:111
`.fish-container` moves (`animation: up-down 1s alternate ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/daft-dashboard/frontend/src/app/globals.css:87
`.fish-swim` moves (`animation: rotate 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/daft-dashboard/frontend/src/app/globals.css:98
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
1 public type in `common_metrics.snapshot` is marked as implementation by its own namespace, folder or name: `StatSnapshotImpl` (src/common/metrics/src/snapshot.rs:26, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — src/common/metrics/src/snapshot.rs:26
1 public type in `daft_checkpoint.impls.s3` is marked as implementation by its own namespace, folder or name: `S3CheckpointStore` (src/daft-checkpoint/src/impls/s3.rs:110, `impls`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — src/daft-checkpoint/src/impls/s3.rs:110
1 public type in `daft_core.datatypes.logical` is marked as implementation by its own namespace, folder or name: `LogicalArrayImpl` (src/daft-core/src/datatypes/logical.rs:19, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — src/daft-core/src/datatypes/logical.rs:19
What to do
Hide `common_metrics.snapshot` (`StatSnapshotImpl`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `daft_checkpoint.impls.s3` (`S3CheckpointStore`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `daft_core.datatypes.logical` (`LogicalArrayImpl`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Only 24/26 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `src/daft-dashboard/frontend`, `src/daft-shuffles`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 14 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:9
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:2
What to do
Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Dependabot is configured but does not watch `npm`, `uv` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`requests.Session(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — daft/catalog/__gravitino/_client.py:112
`urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:112
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:74 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:138 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:74
src/daft-dashboard/frontend/src/components/ui/BookOpenTextIcon.tsx:107 · src/daft-dashboard/frontend/src/components/ui/BookOpenTextIcon.tsx:131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/daft-dashboard/frontend/src/components/ui/BookOpenTextIcon.tsx:107
src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:349 · src/daft-dashboard/frontend/src/app/query/plan-visualizer.tsx:123 — the two spans are one implementation copied and then locally edited — 98 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:349
src/daft-dashboard/frontend/src/app/queries/status.tsx:73 · src/daft-dashboard/frontend/src/app/queries/status.tsx:106 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/daft-dashboard/frontend/src/app/queries/status.tsx:73
src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:505 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:599 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:505
src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:260 · src/daft-dashboard/frontend/src/app/query/plan-visualizer.tsx:74 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:260
src/daft-dashboard/frontend/src/components/server-provider.tsx:78 · src/daft-dashboard/frontend/src/components/server-provider.tsx:96 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/daft-dashboard/frontend/src/components/server-provider.tsx:78
src/daft-dashboard/frontend/src/components/ui/card.tsx:5 · src/daft-dashboard/frontend/src/components/ui/card.tsx:31 · src/daft-dashboard/frontend/src/components/ui/card.tsx:51 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — src/daft-dashboard/frontend/src/components/ui/card.tsx:5
src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:107 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:130 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:107
src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:388 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:388
src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:50 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:88 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:152 · src/daft-dashboard/frontend/src/components/ui/sheet.tsx:111 · +2 more site(s) not listed — the 6 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:50
src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:59 · src/daft-dashboard/frontend/src/components/ui/tooltip.tsx:14 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:59
src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:101 · src/daft-dashboard/frontend/src/app/query/progress-table.tsx:22 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:101
src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:301 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:438 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:749 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. — src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:301
src/daft-dashboard/frontend/src/app/query/status.tsx:10 · src/daft-dashboard/frontend/src/app/query/status.tsx:24 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/daft-dashboard/frontend/src/app/query/status.tsx:10
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
QueryPageInner has cyclomatic complexity 38 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:64
PhysicalNodeCard has cyclomatic complexity 25 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:115
TasksSidebar has cyclomatic complexity 21 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:41
PhysicalPlanTree has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:278
getEffectiveStatus has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:53
Do you agree with this assessment?
R3 · Large Files7.4 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx has 820 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:1
src/daft-dashboard/frontend/src/components/ui/sidebar.tsx has 666 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/daft-dashboard/frontend/src/components/ui/sidebar.tsx:1
src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code2.7 / 10Weak✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 4 application, 4 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×6) — src/daft-dashboard/frontend/src/components/ui/sidebar.tsx, src/daft-dashboard/frontend/src/components/ui/card.tsx, src/daft-dashboard/frontend/src/components/ui/note.tsx, …
no import path from any entry point (4 application, 4 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/daft-dashboard/frontend/src/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×5) — src/daft-dashboard/frontend/src/components/ui/sheet.tsx, src/daft-dashboard/frontend/src/components/ui/separator.tsx, src/daft-dashboard/frontend/src/components/ui/input.tsx, …
Nothing imports this binding — it is safe to review for removal. — src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:172
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. — REDACTED:41
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception. (×2) — daft/execution/vllm.py:147, daft/execution/vllm.py:201
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`trace!` at line 227 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-micropartition/src/partitioning.rs:227
`debug!` at line 227 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/statistics/mod.rs:227
`error!` at line 273 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/statistics/mod.rs:273
`error!` at line 284 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/statistics/mod.rs:284
`debug!` at line 231 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/statistics/stats.rs:231
`error!` at line 82 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/python/dashboard.rs:82
`info!` at line 447 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/python/ray/worker_manager.rs:447
`info!` at line 669 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/python/ray/worker_manager.rs:669
`info!` at line 693 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/python/ray/worker_manager.rs:693
`warn!` at line 721 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/python/ray/worker_manager.rs:721
`warn!` at line 216 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/plan/runner.rs:216
`warn!` at line 48 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/pipeline_node/limit.rs:48
`error!` at line 121 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-distributed/src/pipeline_node/join/key_filtering_join.rs:121
`error!` at line 80 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/client.rs:80
`error!` at line 91 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/client.rs:91
`error!` at line 85 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:85
`error!` at line 106 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:106
`error!` at line 142 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:142
`error!` at line 146 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:146
`info!` at line 263 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:263
`error!` at line 266 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:266
`debug!` at line 300 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:300
`error!` at line 307 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:307
`error!` at line 332 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:332
`warn!` at line 344 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:344
`error!` at line 366 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:366
`warn!` at line 378 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:378
`warn!` at line 465 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:465
`error!` at line 489 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:489
`warn!` at line 530 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:530
`info!` at line 562 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:562
`error!` at line 565 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:565
`debug!` at line 570 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:570
`error!` at line 630 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:630
`warn!` at line 679 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:679
`warn!` at line 776 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:776
`error!` at line 797 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:797
`error!` at line 941 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:941
`error!` at line 970 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:970
`error!` at line 1060 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/daft-dashboard/src/engine.rs:1060
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). A further 4 got runtime (rendered axe-core) evidence this scan: 1.1.1, 1.3.5, 1.4.12, 2.4.4. The other 39 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 5 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
AXH1 Runtime security headers — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility (rendered) — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
D11 Test Reliability — 1 observation(s) recorded · This repository declares 1 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.py, .rs), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
X10 Duplicated predicate — 22 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 55 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — AX6 reached only 2% of this repository's production lines — rust (234,094 lines), python (55,709 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXA1 Runtime unauthenticated reachability — This run crawled public routes only — it had no logged-in session, so there is no authenticated surface to compare anonymous access against and nothing was measured. This is a statement about this run, not about your application: nothing here says access control is missing, and nothing here says it is present.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXI1 Runtime container hardening — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~102926 lines of test source are present (.py, .rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 2 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — Rust suite
DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 2 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 115 value object(s); 15 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 136 current-state document(s) make no claim of a kind M4 checks. 108 claim(s) of kinds M4 does not check were not checked (path 20, command argument 2, environment variable 47, setting 38, cd 1); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P8 Schema migrations — SQLAlchemy is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — the JS/TS workspace (45 production file(s)) has no JavaScript/TypeScript test, but it is 2.09% of this repository's production source and the other 97.91% carries 102,926 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X12 Unreachable branch — X12 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — X13 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 2% of this repository's production lines — rust (234,094 lines), python (55,709 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — X19 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — X23 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X24 Document value interpolated into markup unescaped — X24 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — X25 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 21% of this repository's production lines — rust (234,094 lines), cpp (135 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Boundary-crossing change coupling: dashboard.rs ↔ state.rs src/daft-context/src/subscribers/dashboard.rs:1— `src/daft-context/src/subscribers/dashboard.rs` (context daft-context) and `src/daft-dashboard/src/state.rs` (context daft-dashboard) sit in DIFFERENT parts of the tree yet change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `59be0182` feat(dashboard): per-task progress updates from flotilla workers (#6838); `92d0b50c` feat(dashboard): plumb TaskScheduled events to distinguish pending vs…; `51eb85bf` feat(dashboard): show task sources in tasks sidebar (#6879) — run `git show` on any of them.
Boundary-crossing change coupling: project.rs ↔ lib.rs src/daft-logical-plan/src/ops/project.rs:1— `src/daft-logical-plan/src/ops/project.rs` (context daft-logical-plan) and `src/daft-recordbatch/src/lib.rs` (context daft-recordbatch) sit in DIFFERENT parts of the tree yet change together 72% of the time (33 of the 46 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 33 shared commits counted here, the most recent 3 are `b4166ce2` feat: add try_cast function for safe type conversion (#6960); `ac54bc7c` feat: add Python UDAF support (@daft.udaf) (#6790); `150ef6a0` feat: introduce AggFn trait and two-stage UDAF aggregation pipeline (… — run `git show` on any of them.
Boundary-crossing change coupling: pipeline.rs ↔ translate.rs src/daft-local-execution/src/pipeline.rs:1— `src/daft-local-execution/src/pipeline.rs` (context daft-local-execution) and `src/daft-local-plan/src/translate.rs` (context daft-local-plan) sit in DIFFERENT parts of the tree yet change together 71% of the time (34 of the 48 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 34 shared commits counted here, the most recent 3 are `0343b43f` feat: first_value / last_value aggs for window functions (#6974); `64cd1a69` feat: add forward ASOF joins (#6918); `4f5256e1` fix: Handle dtype mismatch error in join_asof join keys (#6904) — run `git show` on any of them.
Boundary-crossing change coupling: optimization.rs ↔ lib.rs src/daft-dsl/src/optimization.rs:1— `src/daft-dsl/src/optimization.rs` (context daft-dsl) and `src/daft-recordbatch/src/lib.rs` (context daft-recordbatch) sit in DIFFERENT parts of the tree yet change together 70% of the time (14 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `486f6c63` fix: short-circuit evaluation for coalesce (#6525); `e992e590` feat(window): Add window expression definitions (#4168); `0c57abd8` feat(window): Add window function definitions and skeleton API (#4082) — run `git show` on any of them.
Boundary-crossing change coupling: translate.rs ↔ json.rs src/daft-local-plan/src/translate.rs:1— `src/daft-local-plan/src/translate.rs` (context daft-local-plan) and `src/daft-logical-plan/src/display/json.rs` (context daft-logical-plan) sit in DIFFERENT parts of the tree yet change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `64cd1a69` feat: add forward ASOF joins (#6918); `040c09fd` feat: Point-in-Time / ASOF Joins (#6615); `075f4342` chore: Replace RepartitionSpec::IntoPartitions with custom path (#6349) — run `git show` on any of them.
Boundary-crossing change coupling: expressions.py ↔ mod.rs daft/expressions/expressions.py:1— `daft/expressions/expressions.py` (context daft) and `src/daft-core/src/array/ops/mod.rs` (context daft-core) sit in DIFFERENT parts of the tree yet change together 70% of the time (51 of the 73 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 51 shared commits counted here, the most recent 3 are `9ee52ec0` feat: percentile and median ops (#6153); `9411ce86` feat!: add ddof parameter to stddev (default ddof=1) (#6142); `8926b6bd` feat: Expr.var with ddof (#6105) — run `git show` on any of them.
Boundary-crossing change coupling: expressions.py ↔ mod.rs daft/expressions/expressions.py:1— `daft/expressions/expressions.py` (context daft) and `src/daft-core/src/series/ops/mod.rs` (context daft-core) sit in DIFFERENT parts of the tree yet change together 65% of the time (35 of the 54 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 35 shared commits counted here, the most recent 3 are `1c97c27f` feat: Add pow expression (#5237); `63ffd5ea` feat: Adds list constructor to Expression and SQL APIs (#3737); `5549d16b` feat: add binary string operations (length and concatenation) (#3646) — run `git show` on any of them.
Boundary-crossing change coupling: builder.py ↔ sink.rs daft/logical/builder.py:1— `daft/logical/builder.py` (context daft) and `src/daft-logical-plan/src/ops/sink.rs` (context daft-logical-plan) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `cd8592d1` feat: Add generic interface for custom data sinks (#4244); `b519944f` [FEAT] Delta Lake partitioned writing (#2884) (at that commit the file was still `src/daft-plan/src/logical_ops/sink.rs`); `2c13f17d` [FEAT] Iceberg partitioned writes (#2842) (at that commit the file was still `src/daft-plan/src/logical_ops/sink.rs`) — run `git show` on any of them.
Boundary-crossing change coupling: recordbatch_io.py ↔ sink.rs daft/recordbatch/recordbatch_io.py:1— `daft/recordbatch/recordbatch_io.py` (context daft) and `src/daft-logical-plan/src/ops/sink.rs` (context daft-logical-plan) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `b519944f` [FEAT] Delta Lake partitioned writing (#2884) (at that commit the files were still `daft/table/table_io.py` and `src/daft-plan/src/logical_ops/sink.rs`); `2c13f17d` [FEAT] Iceberg partitioned writes (#2842) (at that commit the files were still `daft/table/table_io.py` and `src/daft-plan/src/logical_ops/sink.rs`); `230508f9` [FEAT]: write lance (#2421) (at that commit the files were still `daft/table/table_io.py` and `src/daft-plan/src/logical_ops/sink.rs`) — run `git show` on any of them.
Boundary-crossing change coupling: lib.rs ↔ aggs.rs src/daft-recordbatch/src/lib.rs:1— `src/daft-recordbatch/src/lib.rs` (context daft-recordbatch) and `src/daft-sql/src/modules/aggs.rs` (context daft-sql) sit in DIFFERENT parts of the tree yet change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `ac54bc7c` feat: add Python UDAF support (@daft.udaf) (#6790); `150ef6a0` feat: introduce AggFn trait and two-stage UDAF aggregation pipeline (…; `9ee52ec0` feat: percentile and median ops (#6153) — run `git show` on any of them.
Boundary-crossing change coupling: series.py ↔ utf8.rs daft/series.py:1— `daft/series.py` (context daft) and `src/daft-core/src/array/ops/utf8.rs` (context daft-core) sit in DIFFERENT parts of the tree yet change together 61% of the time (25 of the 41 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `6fe408c5` [FEAT] Adds str.length_bytes() function (#2775); `8544b763` [FEAT] Add `.str.count_matches()` (#2580); `29b02a14` [FEAT] String normalize expression (#2450) — run `git show` on any of them.
Boundary-crossing change coupling: mod.rs ↔ python.rs src/daft-core/src/array/ops/mod.rs:1— `src/daft-core/src/array/ops/mod.rs` (context daft-core) and `src/daft-dsl/src/python.rs` (context daft-dsl) sit in DIFFERENT parts of the tree yet change together 60% of the time (44 of the 73 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 44 shared commits counted here, the most recent 3 are `9ee52ec0` feat: percentile and median ops (#6153); `9411ce86` feat!: add ddof parameter to stddev (default ddof=1) (#6142); `8926b6bd` feat: Expr.var with ddof (#6105) — run `git show` on any of them.
Boundary-crossing change coupling: translate.rs ↔ json.rs src/daft-distributed/src/pipeline_node/translate.rs:1— `src/daft-distributed/src/pipeline_node/translate.rs` (context daft-distributed) and `src/daft-logical-plan/src/display/json.rs` (context daft-logical-plan) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `040c09fd` feat: Point-in-Time / ASOF Joins (#6615); `075f4342` chore: Replace RepartitionSpec::IntoPartitions with custom path (#6349); `21afa098` feat: `index_col` option in `explode` (#5842) — run `git show` on any of them.
Boundary-crossing change coupling: translate.rs ↔ unnest_subquery.rs src/daft-local-plan/src/translate.rs:1— `src/daft-local-plan/src/translate.rs` (context daft-local-plan) and `src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs` (context daft-logical-plan) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `040c09fd` feat: Point-in-Time / ASOF Joins (#6615); `075f4342` chore: Replace RepartitionSpec::IntoPartitions with custom path (#6349); `23508c49` feat: implement into_batches on the swordfish native daft runner (#4935) — run `git show` on any of them.
Boundary-crossing change coupling: ray_actor_pool_udf.py ↔ actor_udf.rs daft/execution/ray_actor_pool_udf.py:1— `daft/execution/ray_actor_pool_udf.py` (context daft) and `src/daft-distributed/src/pipeline_node/actor_udf.rs` (context daft-distributed) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e368b83a` perf: Only Serialize Required Cols in Actor UDFs (#5884); `58d84400` feat: support label_selector specification in ray actor/task creation…; `4f1f22f8` feat: Bind the name of the running UDF to the UDFActor (#5514) — run `git show` on any of them.
Boundary-crossing change coupling: datetime.py ↔ temporal.rs daft/functions/datetime.py:1— `daft/functions/datetime.py` (context daft) and `src/daft-sql/src/modules/temporal.rs` (context daft-sql) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `823c32a0` feat(temporal): add Spark-style timezone conversions (#6919); `f11f05d7` feat(temporal): add Spark-style temporal aliases (#6830); `a20e88cc` feat(temporal): add Spark-style add_months and months_between (#6913) — run `git show` on any of them.
Boundary-crossing change coupling: data_array.rs ↔ lib.rs src/daft-core/src/series/array_impl/data_array.rs:1— `src/daft-core/src/series/array_impl/data_array.rs` (context daft-core) and `src/daft-recordbatch/src/lib.rs` (context daft-recordbatch) sit in DIFFERENT parts of the tree yet change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `4123b509` refactor(arrow2): move the auto conversion logic into array init (#6289); `c0c4efa6` refactor(arrow2): fully remove toarrow2 from arrays & series (#6265); `e5ff39fa` feat(table): implement list_unique and Set aggregation (#3710) — run `git show` on any of them.
Boundary-crossing change coupling: __init__.py ↔ lib.rs daft/io/__init__.py:1— `daft/io/__init__.py` (context daft) and `src/common/io-config/src/lib.rs` (context common) sit in DIFFERENT parts of the tree yet change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `ffe0024a` feat: Add Tencent Cloud COS (Cloud Object Storage) support (#6140); `15b1d63d` feat: Add Apache Gravitino virtual file system (gvfs://) read support…; `c6e9a80c` feat: add tos object source (#5372) — run `git show` on any of them.
Boundary-crossing change coupling: series.py ↔ time.rs daft/series.py:1— `daft/series.py` (context daft) and `src/daft-core/src/array/ops/time.rs` (context daft-core) sit in DIFFERENT parts of the tree yet change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `349d16cf` feat: convert and replace timezone (#6106); `550072e8` feat: temporal functions `quarter`, `unix_date`, `unix_micros`, `unix…; `398d79c3` feat: day_of_month and week_of_year (#4284) — run `git show` on any of them.
Boundary-crossing change coupling: project.rs ↔ aggs.rs src/daft-logical-plan/src/ops/project.rs:1— `src/daft-logical-plan/src/ops/project.rs` (context daft-logical-plan) and `src/daft-sql/src/modules/aggs.rs` (context daft-sql) sit in DIFFERENT parts of the tree yet change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `ac54bc7c` feat: add Python UDAF support (@daft.udaf) (#6790); `150ef6a0` feat: introduce AggFn trait and two-stage UDAF aggregation pipeline (…; `9ee52ec0` feat: percentile and median ops (#6153) — run `git show` on any of them.
Boundary-crossing change coupling: series.py ↔ mod.rs daft/series.py:1— `daft/series.py` (context daft) and `src/daft-core/src/array/ops/mod.rs` (context daft-core) sit in DIFFERENT parts of the tree yet change together 52% of the time (38 of the 73 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 38 shared commits counted here, the most recent 3 are `9411ce86` feat!: add ddof parameter to stddev (default ddof=1) (#6142); `1c97c27f` feat: Add pow expression (#5237); `d9464813` feat: Support product (#5515) — run `git show` on any of them.
Boundary-crossing change coupling: micropartition.rs ↔ file_format_config.rs src/daft-micropartition/src/micropartition.rs:1— `src/daft-micropartition/src/micropartition.rs` (context daft-micropartition) and `src/daft-scan/src/file_format_config.rs` (context daft-scan) sit in DIFFERENT parts of the tree yet change together 50% of the time (13 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `c8b340a8` feat(iceberg): read data files without field IDs via schema.name-mapp…; `1c1f04ce` chore: optimize operator naming (#5204) (at that commit the file was still `src/common/file-formats/src/file_format_config.rs`); `fb89b2a5` feat: Add WARC reader (#3871) (at that commit the file was still `src/common/file-formats/src/file_format_config.rs`) — run `git show` on any of them.
Boundary-crossing change coupling: flotilla.py ↔ worker_manager.rs daft/runners/flotilla.py:1— `daft/runners/flotilla.py` (context daft) and `src/daft-distributed/src/python/ray/worker_manager.rs` (context daft-distributed) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ef95e67d` feat(distributed): add bisect autoscaling strategy for faster cluster…; `69fe81e7` feat(ray): Implement dynamic scale-in for RaySwordfishActor (#5903); `766f0f81` fix(ray): configure worker startup timeout on runner (#7055) — run `git show` on any of them.
Boundary-crossing change coupling: pipeline.rs ↔ window.rs src/daft-local-execution/src/pipeline.rs:1— `src/daft-local-execution/src/pipeline.rs` (context daft-local-execution) and `src/daft-recordbatch/src/ops/window.rs` (context daft-recordbatch) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `0343b43f` feat: first_value / last_value aggs for window functions (#6974); `885afa35` feat(window): order by-only ranking (#4336); `657f19bf` feat(window): order by with no partition by row number impl (#4324) — run `git show` on any of them.
Boundary-crossing change coupling: plan.rs ↔ window.rs src/daft-local-plan/src/plan.rs:1— `src/daft-local-plan/src/plan.rs` (context daft-local-plan) and `src/daft-recordbatch/src/ops/window.rs` (context daft-recordbatch) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `0343b43f` feat: first_value / last_value aggs for window functions (#6974); `885afa35` feat(window): order by-only ranking (#4336); `657f19bf` feat(window): order by with no partition by row number impl (#4324) — run `git show` on any of them.
Orphaned knowledge src/common/treenode/src/lib.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge src/daft-dashboard/src/state.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge src/daft-core/src/datatypes/infer_datatype.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/daft-io/src/object_store_glob.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/daft-recordbatch/src/column/mod.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge src/daft-ext/src/aggregate.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge src/daft-logical-plan/src/optimization/rules/extract_window_function.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge src/daft-parquet/src/reader/chunk_source.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge daft/functions/window.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge benchmarking/tpch/answers.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/daft-dsl/src/functions/function_args.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×3
Click handler on a non-interactive <div> src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:187— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> src/daft-dashboard/frontend/src/app/query/plan-visualizer.tsx:55— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:547— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics· Hover-only interaction on <div> · ×2
Hover-only interaction on <div> src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:374— This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
Hover-only interaction on <div> src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:483— This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> src/daft-dashboard/frontend/src/app/layout.tsx:18— A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component.
D11 · Test Reliability· Test declared unreliable · ×1
Test declared unreliable: sample_data tests/integration/io/test_bigtable_integration.py:15— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Bigtable emulator is disabled in CI because its startup is flaky.". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
TodoComment tests/test_datatype_inference.py:169— # TODO: Uncomment this when we update to pydantic>=2.11 which supports `serialize_by_alias` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/test_datatype_inference.py:392— # TODO: Uncomment this when we update to pydantic>=2.11 which supports `serialize_by_alias` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/test_datatype_inference.py:198— # TODO: uncomment once we support named tuples — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/test_datatype_inference.py:427— # TODO: uncomment once we support named tuples — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/window/test_partition_only.py:30— # sum("value").over(window).alias("sum"), # TODO: Support .over() directly on expressions — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/udf_library/test_url_udfs.py:92— # TODO: Change to a FileNotFound Error — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/sql/test_sql.py:110— # TODO: we can emit a better error message if our agg op can also include expressions on groupby expressions — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/sql/test_sql_table_functions.py:13— # TODO chore: make an asset fixture for all tests (beyond just sql). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_cast.py:1383— # TODO: direct cast to fixed shape sparse — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_cast.py:1401— # TODO: direct cast to fixed shape sparse — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_cast.py:1437— # TODO: direct cast to fixed shape sparse — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_cast.py:1449— # TODO: direct cast to fixed shape sparse — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_if_else.py:159— # TODO(Clark): Uncomment this case when Arrow2 supports casting between FixedSizeList and LargeLists. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_if_else.py:204— # TODO(Clark): Uncomment this case when Arrow2 supports broadcasting between different FixedSizeListArrays. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_if_else.py:313— # TODO(Clark): Uncomment this case when Arrow2 supports casting struct types. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:334— # TODO(Clark): Infer type-leve mode if all images are the same mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:423— # TODO(Clark): Infer type-leve mode if all images are the same mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:473— # TODO(Clark): Infer type-leve mode if all images are the same mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:531— # TODO(Clark): Infer type-leve mode if all images are the same mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:630— # TODO(Clark): Infer type-leve mode if all images are the same mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:447— # TODO(Clark): Support uint16 images. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:451— # TODO(Clark): Support uint16 images. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:501— # TODO(Clark): Support uint16 images. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:505— # TODO(Clark): Support uint16 images. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/series/test_image.py:599— # TODO(Clark): Support uint16 images. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FileTooLong: src/plan.rs src/daft-local-plan/src/plan.rs— FileTooLong — 2121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 78% of them inside a single declaration: LocalPhysicalPlan (4 blocks, 74-1971). The bar is 500 significant lines; this is 1621 over it, 4.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dataframe/dataframe.py daft/dataframe/dataframe.py— FileTooLong — 1976 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1476 over it, 3.95× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: expr/mod.rs src/daft-dsl/src/expr/mod.rs— FileTooLong — 1926 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1426 over it, 3.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/planner.rs src/daft-sql/src/planner.rs— FileTooLong — 1723 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: SQLPlanner (4 blocks, 165-2293). The bar is 500 significant lines; this is 1223 over it, 3.45× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/python.rs src/common/io-config/src/python.rs— FileTooLong — 1721 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1221 over it, 3.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs src/daft-recordbatch/src/lib.rs— FileTooLong — 1445 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: RecordBatch (9 blocks, 68-2060). The bar is 500 significant lines; this is 945 over it, 2.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ops/cast.rs src/daft-core/src/array/ops/cast.rs— FileTooLong — 1405 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 905 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/pipeline.rs src/daft-local-execution/src/pipeline.rs— FileTooLong — 1363 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 863 over it, 2.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: builder/mod.rs src/daft-logical-plan/src/builder/mod.rs— FileTooLong — 1321 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: LogicalPlanBuilder (5 blocks, 61-1233). The bar is 500 significant lines; this is 821 over it, 2.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/s3_like.rs src/daft-io/src/s3_like.rs— FileTooLong — 1262 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 762 over it, 2.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: expressions/expressions.py daft/expressions/expressions.py— FileTooLong — 1111 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 611 over it, 2.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/python.rs src/daft-micropartition/src/python.rs— FileTooLong — 1052 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 73% of them inside a single declaration: PyMicroPartition (4 blocks, 32-1273). The bar is 500 significant lines; this is 552 over it, 2.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/logical_plan.rs src/daft-logical-plan/src/logical_plan.rs— FileTooLong — 1024 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: LogicalPlan (4 blocks, 35-1223). The bar is 500 significant lines; this is 524 over it, 2.05× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ops/inline_agg.rs src/daft-recordbatch/src/ops/inline_agg.rs— FileTooLong — 1014 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 514 over it, 2.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/python.rs src/daft-scan/src/python.rs— FileTooLong — 940 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 440 over it, 1.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/kernels.rs src/daft-functions-list/src/kernels.rs— FileTooLong — 865 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 365 over it, 1.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: daft/datatype.py daft/datatype.py— FileTooLong — 810 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 310 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/engine.rs src/daft-dashboard/src/engine.rs— FileTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 35 free functions. The bar is 500 significant lines; this is 289 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: daft/series.py daft/series.py— FileTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 261 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 250 over it, 1.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/dtype.rs src/daft-schema/src/dtype.rs— FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: DataType (6 blocks, 17-1144). The bar is 500 significant lines; this is 221 over it, 1.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/ops.rs src/daft-image/src/ops.rs— FileTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 219 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: modules/temporal.rs src/daft-sql/src/modules/temporal.rs— FileTooLong — 703 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 203 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/azure_blob.rs src/daft-io/src/azure_blob.rs— FileTooLong — 700 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 66% of them inside a single declaration: AzureBlobSource (3 blocks, 388-1061). The bar is 500 significant lines; this is 200 over it, 1.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: join/asof_join.rs src/daft-local-execution/src/join/asof_join.rs— FileTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 198 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (9 lines × 2) src/common/io-config/src/python.rs:2022— src/common/io-config/src/python.rs:2022-2030 | src/common/io-config/src/python.rs:2307-2315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/io-config/src/python.rs:2022` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-core/src/array/ops/hash.rs:409— src/daft-core/src/array/ops/hash.rs:409-417 | src/daft-core/src/array/ops/hash.rs:450-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/hash.rs:409` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) src/daft-dashboard/src/engine.rs:587— src/daft-dashboard/src/engine.rs:587-595 | src/daft-dashboard/src/engine.rs:656-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/daft-distributed/src/pipeline_node/explode.rs:159— src/daft-distributed/src/pipeline_node/explode.rs:159-167 | src/daft-local-execution/src/intermediate_ops/explode.rs:151-159 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/explode.rs:159` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-distributed/src/pipeline_node/join/asof_join.rs:380— src/daft-distributed/src/pipeline_node/join/asof_join.rs:380-388 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:222-230 — before extracting anything, compare `src/daft-distributed/src/pipeline_node/join/asof_join.rs` and `src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/join/asof_join.rs:380` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-distributed/src/pipeline_node/join/hash_join.rs:105— src/daft-distributed/src/pipeline_node/join/hash_join.rs:105-113 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:91-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) src/daft-distributed/src/pipeline_node/sink.rs:293— src/daft-distributed/src/pipeline_node/sink.rs:293-301 | src/daft-logical-plan/src/ops/sink.rs:92-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/sink.rs:293` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-distributed/src/pipeline_node/sort.rs:239— src/daft-distributed/src/pipeline_node/sort.rs:239-247 | src/daft-distributed/src/pipeline_node/sort.rs:293-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/sort.rs:239` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-distributed/src/pipeline_node/unpivot.rs:82— src/daft-distributed/src/pipeline_node/unpivot.rs:82-90 | src/daft-logical-plan/src/ops/unpivot.rs:120-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) src/daft-dsl/src/expr/display.rs:32— src/daft-dsl/src/expr/display.rs:32-40 | src/daft-dsl/src/functions/mod.rs:108-116 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/expr/display.rs:32` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-ext/src/abi/arrow.rs:378— src/daft-ext/src/abi/arrow.rs:378-386 | src/daft-ext/src/abi/arrow.rs:446-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) src/daft-functions-list/src/kernels.rs:225— src/daft-functions-list/src/kernels.rs:225-233 | src/daft-functions-list/src/kernels.rs:296-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-functions-list/src/kernels.rs:374— src/daft-functions-list/src/kernels.rs:374-382 | src/daft-functions-list/src/kernels.rs:759-767 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:374` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-functions-list/src/series.rs:239— src/daft-functions-list/src/series.rs:239-247 | src/daft-functions-list/src/series.rs:250-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/series.rs:239` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-functions-utf8/src/split_part.rs:156— src/daft-functions-utf8/src/split_part.rs:156-164 | src/daft-functions-utf8/src/substring_index.rs:152-160 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/split_part.rs:156` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-io/src/s3_like.rs:1033— src/daft-io/src/s3_like.rs:1033-1041 | src/daft-io/src/s3_like.rs:1169-1177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/s3_like.rs:1033` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-local-execution/src/concat.rs:134— src/daft-local-execution/src/concat.rs:134-142 | src/daft-local-execution/src/streaming_sink/base.rs:475-483 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/concat.rs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:342— src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:342-350 | src/daft-local-execution/src/join/join_node.rs:89-97 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:342` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-local-execution/src/join/asof_join.rs:223— src/daft-local-execution/src/join/asof_join.rs:223-231 | src/daft-local-execution/src/join/asof_join.rs:276-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:205— src/daft-local-execution/src/join/left_right_join.rs:205-213 | src/daft-local-execution/src/join/left_right_join.rs:253-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/daft-local-execution/src/join/outer_join.rs:213— src/daft-local-execution/src/join/outer_join.rs:213-221 | src/daft-local-execution/src/join/outer_join.rs:245-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/outer_join.rs:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/daft-local-execution/src/sources/scan_task.rs:188— src/daft-local-execution/src/sources/scan_task.rs:188-196 | src/daft-local-execution/src/sources/shuffle_read.rs:160-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sources/scan_task.rs:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-local-execution/src/sources/scan_task.rs:187` calls `is_none` and `src/daft-local-execution/src/sources/shuffle_read.rs:159` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) src/daft-micropartition/src/micropartition.rs:684— src/daft-micropartition/src/micropartition.rs:684-692 | src/daft-micropartition/src/micropartition.rs:708-716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/daft-micropartition/src/python.rs:1058— src/daft-micropartition/src/python.rs:1058-1066 | src/daft-micropartition/src/python.rs:1091-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-micropartition/src/python.rs:1067` calls `Some` and `src/daft-micropartition/src/python.rs:1100` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) src/daft-parquet/src/metadata.rs:286— src/daft-parquet/src/metadata.rs:286-294 | src/daft-parquet/src/metadata.rs:423-431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-parquet/src/metadata.rs:286` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
MethodTooLong: LocalPhysicalPlan.with_new_children src/daft-local-plan/src/plan.rs:1320— MethodTooLong — with_new_children runs 561 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 461 over it, 5.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LogicalPlanToPipelineNodeTranslator.f_up src/daft-distributed/src/pipeline_node/translate.rs:128— MethodTooLong — f_up runs 440 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 340 over it, 4.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SQLPlanner.plan_expr src/daft-sql/src/planner.rs:1645— MethodTooLong — plan_expr runs 409 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 309 over it, 4.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PushDownProjection.try_optimize_project src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:28— MethodTooLong — try_optimize_project runs 350 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 250 over it, 3.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GlobScanOperator.try_new src/daft-scan/src/glob.rs:153— MethodTooLong — try_new runs 300 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RecordBatch.eval_expression_async_with_metrics src/daft-recordbatch/src/lib.rs:882— MethodTooLong — eval_expression_async_with_metrics runs 298 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PushDownFilter.try_optimize_node src/daft-logical-plan/src/optimization/rules/push_down_filter.rs:44— MethodTooLong — try_optimize_node runs 289 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 189 over it, 2.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Series.deserialize src/daft-core/src/series/serdes.rs:37— MethodTooLong — deserialize runs 269 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RecordBatch.eval_expression_internal src/daft-recordbatch/src/lib.rs:1294— MethodTooLong — eval_expression_internal runs 241 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LogicalPlan.with_new_children src/daft-logical-plan/src/logical_plan.rs:595— MethodTooLong — with_new_children runs 235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PushDownLimit.try_optimize_node src/daft-logical-plan/src/optimization/rules/push_down_limit.rs:45— MethodTooLong — try_optimize_node runs 181 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LogicalPlan.required_columns src/daft-logical-plan/src/logical_plan.rs:196— MethodTooLong — required_columns runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Literal.into_pyobject src/daft-core/src/lit/python.rs:47— MethodTooLong — into_pyobject runs 166 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Expr.semantic_id src/daft-dsl/src/expr/mod.rs:1481— MethodTooLong — semantic_id runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Expr.to_field src/daft-dsl/src/expr/mod.rs:2038— MethodTooLong — to_field runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ProbeExecutionContext.process_probe_input src/daft-local-execution/src/join/probe.rs:208— MethodTooLong — process_probe_input runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PushDownAntiSemiJoin.try_optimize src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:108— MethodTooLong — try_optimize runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LogicalPlan.map_expressions src/daft-logical-plan/src/treenode.rs:41— MethodTooLong — map_expressions runs 163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AggExpr.to_field src/daft-dsl/src/expr/mod.rs:838— MethodTooLong — to_field runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RecordBatch.eval_agg_expression src/daft-recordbatch/src/lib.rs:712— MethodTooLong — eval_agg_expression runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SQLPlanner.plan_query src/daft-sql/src/planner.rs:398— MethodTooLong — plan_query runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RuntimeStatsManager.new_impl src/daft-local-execution/src/runtime_stats/mod.rs:374— MethodTooLong — new_impl runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PyDaftExecutionConfig.with_config_values src/common/daft-config/src/python.rs:127— MethodTooLong — with_config_values runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AsofJoinOperator.finalize_probe src/daft-local-execution/src/join/asof_join.rs:839— MethodTooLong — finalize_probe runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BlockingSinkNode.run src/daft-local-execution/src/sinks/blocking_sink.rs:300— MethodTooLong — run runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (10 lines × 2) src/common/io-config/src/python.rs:1967— src/common/io-config/src/python.rs:1967-1976 | src/common/io-config/src/python.rs:2245-2254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/io-config/src/python.rs:1967` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-catalog/src/python/wrappers.rs:95— src/daft-catalog/src/python/wrappers.rs:95-104 | src/daft-catalog/src/python/wrappers.rs:164-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-catalog/src/python/wrappers.rs:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-core/src/array/ops/compare_agg.rs:123— src/daft-core/src/array/ops/compare_agg.rs:123-132 | src/daft-core/src/array/ops/compare_agg.rs:182-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/compare_agg.rs:123` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-core/src/series/ops/arithmetic.rs:175— src/daft-core/src/series/ops/arithmetic.rs:175-184 | src/daft-core/src/series/ops/arithmetic.rs:273-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/ops/arithmetic.rs:175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-csv/src/local.rs:233— src/daft-csv/src/local.rs:233-242 | src/daft-csv/src/read.rs:744-753 — before extracting anything, compare `src/daft-csv/src/local.rs` and `src/daft-csv/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/daft-csv/src/read.rs:244— src/daft-csv/src/read.rs:244-253 | src/daft-parquet/src/read.rs:229-238 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-parquet/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:244` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-ext/src/abi/arrow.rs:126— src/daft-ext/src/abi/arrow.rs:126-135 | src/daft-ext/src/abi/arrow.rs:147-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/daft-ext/src/abi/arrow.rs:273— src/daft-ext/src/abi/arrow.rs:273-282 | src/daft-ext/src/abi/arrow.rs:294-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/daft-ext/src/aggregate.rs:66— src/daft-ext/src/aggregate.rs:66-75 | src/daft-ext/src/function.rs:55-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext/src/aggregate.rs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-functions-temporal/src/date_navigation.rs:55— src/daft-functions-temporal/src/date_navigation.rs:55-64 | src/daft-functions-temporal/src/date_navigation.rs:137-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_navigation.rs:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-functions-utf8/src/hamming.rs:84— src/daft-functions-utf8/src/hamming.rs:84-93 | src/daft-functions-utf8/src/utils.rs:327-336 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/hamming.rs:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-io/src/azure_blob.rs:941— src/daft-io/src/azure_blob.rs:941-950 | src/daft-io/src/google_cloud.rs:253-262 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/azure_blob.rs:941` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) src/daft-io/src/google_cloud.rs:567— src/daft-io/src/google_cloud.rs:567-576 | src/daft-io/src/http.rs:314-323 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `&GCSConfig` in one and `&HTTPConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) src/daft-json/src/local.rs:140— src/daft-json/src/local.rs:140-149 | src/daft-json/src/local.rs:354-363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-json/src/local.rs:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-local-execution/src/join/anti_semi_join.rs:92— src/daft-local-execution/src/join/anti_semi_join.rs:92-101 | src/daft-local-execution/src/join/outer_join.rs:37-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/anti_semi_join.rs:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-local-execution/src/pipeline.rs:1433— src/daft-local-execution/src/pipeline.rs:1433-1442 | src/daft-local-execution/src/pipeline.rs:1520-1529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/pipeline.rs:1433` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-local-execution/src/pipeline.rs:1432` calls `clone` and `src/daft-local-execution/src/pipeline.rs:1519` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/daft-local-execution/src/sinks/sort.rs:120— src/daft-local-execution/src/sinks/sort.rs:120-129 | src/daft-logical-plan/src/ops/sort.rs:89-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/sort.rs:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-logical-plan/src/ops/sort.rs:99` calls `Materialized`, `push` and `src/daft-local-execution/src/sinks/sort.rs:130` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/daft-local-execution/src/sinks/window_order_by_only.rs:198— src/daft-local-execution/src/sinks/window_order_by_only.rs:198-207 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:290-299 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/window_order_by_only.rs:198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-local-execution/src/streaming_sink/base.rs:248— src/daft-local-execution/src/streaming_sink/base.rs:248-257 | src/daft-local-execution/src/streaming_sink/base.rs:261-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/daft-local-plan/src/plan.rs:1199— src/daft-local-plan/src/plan.rs:1199-1208 | src/daft-local-plan/src/plan.rs:1279-1288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/daft-logical-plan/src/ops/project.rs:453— src/daft-logical-plan/src/ops/project.rs:453-462 | src/daft-logical-plan/src/ops/project.rs:531-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/project.rs:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-logical-plan/src/ops/set_operations.rs:370— src/daft-logical-plan/src/ops/set_operations.rs:370-379 | src/daft-logical-plan/src/ops/set_operations.rs:380-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/daft-parquet/src/python.rs:203— src/daft-parquet/src/python.rs:203-212 | src/daft-parquet/src/python.rs:258-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-parquet/src/python.rs:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-schema/src/field.rs:136— src/daft-schema/src/field.rs:136-145 | src/daft-schema/src/field.rs:152-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-schema/src/field.rs:136` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/daft-sql/src/modules/aggs.rs:101— src/daft-sql/src/modules/aggs.rs:101-110 | src/daft-sql/src/modules/aggs.rs:143-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/common/io-config/src/cos.rs:77— src/common/io-config/src/cos.rs:77-84 | src/common/io-config/src/tos.rs:67-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/daft-avro/src/write.rs:103— src/daft-avro/src/write.rs:103-110 | src/daft-avro/src/write.rs:144-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-avro/src/write.rs:111` calls `new_empty` and `src/daft-avro/src/write.rs:153` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/daft-core/src/array/ops/arithmetic.rs:252— src/daft-core/src/array/ops/arithmetic.rs:252-259 | src/daft-core/src/array/ops/arithmetic.rs:292-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/arithmetic.rs:252` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-core/src/array/ops/broadcast.rs:122— src/daft-core/src/array/ops/broadcast.rs:122-129 | src/daft-core/src/array/ops/broadcast.rs:168-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/broadcast.rs:122` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-distributed/src/pipeline_node/explode.rs:85— src/daft-distributed/src/pipeline_node/explode.rs:85-92 | src/daft-distributed/src/pipeline_node/filter.rs:85-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/explode.rs:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-distributed/src/scheduling/scheduler/default.rs:49— src/daft-distributed/src/scheduling/scheduler/default.rs:49-56 | src/daft-distributed/src/scheduling/scheduler/linear.rs:29-36 — before extracting anything, compare `src/daft-distributed/src/scheduling/scheduler/default.rs` and `src/daft-distributed/src/scheduling/scheduler/linear.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) src/daft-functions-temporal/src/date_navigation.rs:72— src/daft-functions-temporal/src/date_navigation.rs:72-79 | src/daft-functions-temporal/src/date_navigation.rs:154-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_navigation.rs:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-functions-temporal/src/time.rs:213— src/daft-functions-temporal/src/time.rs:213-220 | src/daft-functions-temporal/src/time.rs:289-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/time.rs:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-functions-temporal/src/time.rs:287` calls `as_deref`, `transpose` and `src/daft-functions-temporal/src/time.rs:211` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/daft-functions-utf8/src/substr.rs:153— src/daft-functions-utf8/src/substr.rs:153-160 | src/daft-functions-utf8/src/substr.rs:188-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/substr.rs:153` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) src/daft-logical-plan/src/ops/set_operations.rs:203— src/daft-logical-plan/src/ops/set_operations.rs:203-211 | src/daft-logical-plan/src/ops/set_operations.rs:507-514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/set_operations.rs:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:236— src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:236-243 | src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:250-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:244` calls `Some` and `src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:260` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:329— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:329-336 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:366-373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:329` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-micropartition/src/python.rs:642— src/daft-micropartition/src/python.rs:642-649 | src/daft-recordbatch/src/python.rs:400-407 — before extracting anything, compare `src/daft-micropartition/src/python.rs` and `src/daft-recordbatch/src/python.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-micropartition/src/python.rs:642` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-parquet/src/python.rs:214— src/daft-parquet/src/python.rs:214-221 | src/daft-parquet/src/python.rs:268-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-parquet/src/python.rs:214` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) src/daft-recordbatch/src/lib.rs:1350— src/daft-recordbatch/src/lib.rs:1350-1357 | src/daft-recordbatch/src/lib.rs:1372-1379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:269— src/daft-recordbatch/src/ops/inline_agg.rs:269-276 | src/daft-recordbatch/src/ops/inline_agg.rs:332-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:269` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-scan/src/scan_task_iters/mod.rs:321— src/daft-scan/src/scan_task_iters/mod.rs:321-328 | src/daft-scan/src/scan_task_iters/split_jsonl/mod.rs:129-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/scan_task_iters/mod.rs:321` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-writers/src/csv_writer.rs:73— src/daft-writers/src/csv_writer.rs:73-80 | src/daft-writers/src/json_writer.rs:48-55 — before extracting anything, compare `src/daft-writers/src/csv_writer.rs` and `src/daft-writers/src/json_writer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) src/daft-writers/src/csv_writer.rs:199— src/daft-writers/src/csv_writer.rs:199-206 | src/daft-writers/src/json_writer.rs:154-161 — before extracting anything, compare `src/daft-writers/src/csv_writer.rs` and `src/daft-writers/src/json_writer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-writers/src/csv_writer.rs:199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-writers/src/json_writer.rs:163` calls `is_none`, `Ok` and `src/daft-writers/src/csv_writer.rs:207` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/daft-logical-plan/src/optimization/rules/split_udfs.rs:420— src/daft-logical-plan/src/optimization/rules/split_udfs.rs:420-427 | src/daft-logical-plan/src/optimization/rules/split_udfs.rs:432-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/daft-core/src/lit/deserializer.rs:313— src/daft-core/src/lit/deserializer.rs:313-320 | src/daft-core/src/lit/deserializer.rs:364-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/lit/deserializer.rs:313` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-recordbatch/src/ops/joins/hash_join.rs:27— src/daft-recordbatch/src/ops/joins/hash_join.rs:27-34 | src/daft-recordbatch/src/ops/joins/hash_join.rs:315-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/joins/hash_join.rs:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/daft-distributed/src/scheduling/scheduler/default.rs:79— src/daft-distributed/src/scheduling/scheduler/default.rs:79-86 | src/daft-distributed/src/scheduling/scheduler/linear.rs:57-64 — before extracting anything, compare `src/daft-distributed/src/scheduling/scheduler/default.rs` and `src/daft-distributed/src/scheduling/scheduler/linear.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/daft-dashboard/src/engine.rs:940— src/daft-dashboard/src/engine.rs:940-948 | src/daft-dashboard/src/engine.rs:969-976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) src/daft-image/src/functions/resize.rs:21— src/daft-image/src/functions/resize.rs:21-28 | src/daft-image/src/functions/resize.rs:31-38 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-image/src/functions/resize.rs:21` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-catalog/src/python/wrappers.rs:273— src/daft-catalog/src/python/wrappers.rs:273-279 | src/daft-catalog/src/python/wrappers.rs:290-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-catalog/src/python/wrappers.rs:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-core/src/kernels/hashing.rs:651— src/daft-core/src/kernels/hashing.rs:651-657 | src/daft-core/src/kernels/hashing.rs:755-761 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/kernels/hashing.rs:651` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-csv/src/local.rs:933— src/daft-csv/src/local.rs:933-939 | src/daft-csv/src/read.rs:777-783 — before extracting anything, compare `src/daft-csv/src/local.rs` and `src/daft-csv/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/local.rs:933` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) src/daft-distributed/src/pipeline_node/window.rs:97— src/daft-distributed/src/pipeline_node/window.rs:97-103 | src/daft-distributed/src/pipeline_node/window.rs:199-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/window.rs:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-ext-internal/src/aggregate.rs:125— src/daft-ext-internal/src/aggregate.rs:125-131 | src/daft-ext-internal/src/aggregate.rs:233-239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/daft-file/src/functions.rs:507— src/daft-file/src/functions.rs:507-513 | src/daft-file/src/functions.rs:551-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-file/src/functions.rs:507` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-functions-temporal/src/date_navigation.rs:38— src/daft-functions-temporal/src/date_navigation.rs:38-44 | src/daft-functions-temporal/src/date_navigation.rs:122-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_navigation.rs:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-functions-utf8/src/chr.rs:60— src/daft-functions-utf8/src/chr.rs:60-66 | src/daft-functions-utf8/src/space.rs:59-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/chr.rs:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-functions-utf8/src/regexp_extract.rs:58— src/daft-functions-utf8/src/regexp_extract.rs:58-64 | src/daft-functions-utf8/src/regexp_extract_all.rs:60-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/regexp_extract.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-io/src/http.rs:383— src/daft-io/src/http.rs:383-389 | src/daft-io/src/http.rs:422-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:235— src/daft-local-execution/src/join/left_right_join.rs:235-241 | src/daft-local-execution/src/join/outer_join.rs:201-207 — before extracting anything, compare `src/daft-local-execution/src/join/left_right_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/daft-local-plan/src/plan.rs:1186— src/daft-local-plan/src/plan.rs:1186-1192 | src/daft-local-plan/src/plan.rs:1271-1277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:338— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:338-344 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:376-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/daft-logical-plan/src/partitioning.rs:200— src/daft-logical-plan/src/partitioning.rs:200-206 | src/daft-logical-plan/src/partitioning.rs:371-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/daft-scan/src/python.rs:640— src/daft-scan/src/python.rs:640-646 | src/daft-scan/src/python.rs:649-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/daft-session/src/session.rs:403— src/daft-session/src/session.rs:403-409 | src/daft-session/src/session.rs:432-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-session/src/session.rs:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) src/daft-session/src/session.rs:532— src/daft-session/src/session.rs:532-538 | src/daft-session/src/session.rs:557-563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-session/src/session.rs:532` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-writers/src/csv_writer.rs:57— src/daft-writers/src/csv_writer.rs:57-63 | src/daft-writers/src/json_writer.rs:32-38 — before extracting anything, compare `src/daft-writers/src/csv_writer.rs` and `src/daft-writers/src/json_writer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:612— src/daft-recordbatch/src/ops/inline_agg.rs:612-618 | src/daft-recordbatch/src/ops/inline_agg.rs:649-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:612` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-ext-internal/src/aggregate.rs:21— src/daft-ext-internal/src/aggregate.rs:21-27 | src/daft-ext-internal/src/function.rs:31-37 — before extracting anything, compare `src/daft-ext-internal/src/aggregate.rs` and `src/daft-ext-internal/src/function.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/daft-functions-list/src/append.rs:52— src/daft-functions-list/src/append.rs:52-62 | src/daft-functions-list/src/flatten.rs:41-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/append.rs:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-functions-list/src/append.rs:51` calls `required`, `to_field` and `src/daft-functions-list/src/flatten.rs:40` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) src/daft-catalog/src/python/wrappers.rs:119— src/daft-catalog/src/python/wrappers.rs:119-128 | src/daft-catalog/src/python/wrappers.rs:192-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-catalog/src/python/wrappers.rs:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-ai/src/python.rs:25— src/daft-ai/src/python.rs:25-31 | src/daft-catalog/src/python/wrappers.rs:33-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ai/src/python.rs:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-logical-plan/src/builder/resolve_expr.rs:51— src/daft-logical-plan/src/builder/resolve_expr.rs:51-57 | src/daft-logical-plan/src/builder/resolve_expr.rs:61-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/builder/resolve_expr.rs:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/daft-functions-list/src/explode.rs:45— src/daft-functions-list/src/explode.rs:45-51 | src/daft-functions-list/src/flatten.rs:37-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/explode.rs:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) src/common/runtime/src/joinset.rs:70— src/common/runtime/src/joinset.rs:70-75 | src/common/runtime/src/joinset.rs:88-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/runtime/src/joinset.rs:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-csv/src/metadata.rs:80— src/daft-csv/src/metadata.rs:80-85 | src/daft-json/src/schema.rs:83-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/metadata.rs:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-dsl/src/python_udf/batch.rs:240— src/daft-dsl/src/python_udf/batch.rs:240-245 | src/daft-dsl/src/python_udf/row_wise.rs:453-458 — before extracting anything, compare `src/daft-dsl/src/python_udf/batch.rs` and `src/daft-dsl/src/python_udf/row_wise.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udf/batch.rs:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-dsl/src/python_udf/row_wise.rs:200— src/daft-dsl/src/python_udf/row_wise.rs:200-205 | src/daft-dsl/src/python_udf/row_wise.rs:373-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udf/row_wise.rs:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-ext-internal/src/module.rs:147— src/daft-ext-internal/src/module.rs:147-154 | src/daft-ext-internal/src/module.rs:190-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext-internal/src/module.rs:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) src/daft-functions-binary/src/decode.rs:63— src/daft-functions-binary/src/decode.rs:63-68 | src/daft-functions-binary/src/decode.rs:71-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-binary/src/decode.rs:63` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-functions-binary/src/decode.rs:118— src/daft-functions-binary/src/decode.rs:118-123 | src/daft-functions-binary/src/decode.rs:126-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-binary/src/decode.rs:118` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-functions-serde/src/format/json.rs:13— src/daft-functions-serde/src/format/json.rs:13-18 | src/daft-functions-serde/src/format/json.rs:52-57 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/daft-logical-plan/src/ops/set_operations.rs:241— src/daft-logical-plan/src/ops/set_operations.rs:241-246 | src/daft-logical-plan/src/ops/set_operations.rs:527-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/set_operations.rs:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:821— src/daft-recordbatch/src/ops/inline_agg.rs:821-826 | src/daft-recordbatch/src/ops/inline_agg.rs:835-840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-recordbatch/src/ops/joins/mod.rs:134— src/daft-recordbatch/src/ops/joins/mod.rs:134-139 | src/daft-recordbatch/src/ops/joins/mod.rs:148-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/joins/mod.rs:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-sql/src/modules/config.rs:487— src/daft-sql/src/modules/config.rs:487-492 | src/daft-sql/src/modules/config.rs:608-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-sql/src/modules/config.rs:484` calls `into` and `src/daft-sql/src/modules/config.rs:606` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) src/daft-writers/src/json_writer.rs:114— src/daft-writers/src/json_writer.rs:114-119 | src/daft-writers/src/parquet_writer.rs:165-170 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-writers/src/json_writer.rs:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-distributed/src/python/ray/worker_manager.rs:581— src/daft-distributed/src/python/ray/worker_manager.rs:581-586 | src/daft-distributed/src/python/ray/worker_manager.rs:747-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/python/ray/worker_manager.rs:581` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-ext-internal/src/module.rs:125— src/daft-ext-internal/src/module.rs:125-130 | src/daft-ext-internal/src/module.rs:168-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext-internal/src/module.rs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-ext/src/aggregate.rs:111— src/daft-ext/src/aggregate.rs:111-116 | src/daft-ext/src/function.rs:79-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) src/daft-functions-list/src/bool_and.rs:36— src/daft-functions-list/src/bool_and.rs:36-41 | src/daft-functions-list/src/bool_or.rs:34-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/bool_and.rs:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-image/src/ops.rs:521— src/daft-image/src/ops.rs:521-526 | src/daft-image/src/ops.rs:914-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/daft-core/src/array/fixed_size_list_array.rs:271— src/daft-core/src/array/fixed_size_list_array.rs:271-276 | src/daft-core/src/array/list_array.rs:259-264 — before extracting anything, compare `src/daft-core/src/array/fixed_size_list_array.rs` and `src/daft-core/src/array/list_array.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/daft-distributed/src/pipeline_node/limit.rs:216— src/daft-distributed/src/pipeline_node/limit.rs:216-221 | src/daft-local-execution/src/streaming_sink/limit.rs:116-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/daft-avro/src/lib.rs:48— src/daft-avro/src/lib.rs:48-53 | src/daft-json/src/lib.rs:45-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `err` to `AvroError` in one and `Error` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) src/daft-io/src/gravitino.rs:318— src/daft-io/src/gravitino.rs:318-323 | src/daft-io/src/unity.rs:211-216 — before extracting anything, compare `src/daft-io/src/gravitino.rs` and `src/daft-io/src/unity.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/gravitino.rs:318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-core/src/datatypes/infer_datatype.rs:297— src/daft-core/src/datatypes/infer_datatype.rs:297-304 | src/daft-core/src/datatypes/infer_datatype.rs:355-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/datatypes/infer_datatype.rs:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-dsl/src/expr/mod.rs:708— src/daft-dsl/src/expr/mod.rs:708-713 | src/daft-dsl/src/expr/mod.rs:716-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/expr/mod.rs:708` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/daft-functions-utf8/src/split_part.rs:39— src/daft-functions-utf8/src/split_part.rs:39-44 | src/daft-functions-utf8/src/substring_index.rs:37-42 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/split_part.rs:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
TooManyMethods: Expression daft/expressions/expressions.py:133— TooManyMethods — 287 methods. The bar is 30 methods; this is 257 over it, 9.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Series src/daft-core/src/series/mod.rs:32— TooManyMethods — 157 methods, declared across 36 files: ops/downcast.rs (39), ops/time.rs (22), series/mod.rs (21), ops/agg.rs (19), +32 more file(s). The bar is 30 methods; this is 127 over it, 5.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataFrame daft/dataframe/dataframe.py:181— TooManyMethods — 121 methods. The bar is 30 methods; this is 91 over it, 4.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Series daft/series.py:20— TooManyMethods — 104 methods. The bar is 30 methods; this is 74 over it, 3.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PyDataType src/daft-schema/src/python/datatype.rs:91— TooManyMethods — 99 methods. The bar is 30 methods; this is 69 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RecordBatch src/daft-recordbatch/src/lib.rs:68— TooManyMethods — 94 methods, declared across 13 files: src/lib.rs (51), ops/window.rs (15), ops/partition.rs (6), ops/agg.rs (5), +9 more file(s). The bar is 30 methods; this is 64 over it, 3.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataType daft/datatype.py:148— TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PyExpr src/daft-dsl/src/python.rs:352— TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PySeries src/daft-core/src/python/series.rs:34— TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Expr src/daft-dsl/src/expr/mod.rs:222— TooManyMethods — 71 methods, declared across 2 files: expr/mod.rs (66), arithmetic/mod.rs (5). The bar is 30 methods; this is 41 over it, 2.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataType src/daft-schema/src/dtype.rs:17— TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataArray src/daft-core/src/array/mod.rs:41— TooManyMethods — 69 methods, declared across 33 files: array/mod.rs (18), array/from.rs (5), ops/log.rs (5), ops/sign.rs (3), +29 more file(s). The bar is 30 methods; this is 39 over it, 2.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SQLPlanner src/daft-sql/src/planner.rs:165— TooManyMethods — 62 methods, declared across 4 files: src/planner.rs (43), src/statement.rs (11), src/functions.rs (7), table_provider/mod.rs (1). The bar is 30 methods; this is 32 over it, 2.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MicroPartition daft/recordbatch/micropartition.py:37— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LogicalPlanBuilder src/daft-logical-plan/src/builder/mod.rs:61— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PyMicroPartition src/daft-micropartition/src/python.rs:32— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LocalPhysicalPlan src/daft-local-plan/src/plan.rs:74— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RecordBatch daft/recordbatch/recordbatch.py:38— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Session daft/session.py:86— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LogicalPlanBuilder daft/logical/builder.py:55— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MicroPartition src/daft-micropartition/src/micropartition.rs:36— TooManyMethods — 46 methods, declared across 13 files: src/micropartition.rs (14), ops/partition.rs (5), ops/eval_expressions.rs (4), ops/join.rs (4), +9 more file(s). The bar is 30 methods; this is 16 over it, 1.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PyLogicalPlanBuilder src/daft-logical-plan/src/builder/mod.rs:1246— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PyRecordBatch src/daft-recordbatch/src/python.rs:26— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SeriesStringNamespace daft/series.py:870— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Catalog daft/catalog/__init__.py:89— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FunctionTooLong: daft_local_execution::pipeline::physical_plan_to_pipeline src/daft-local-execution/src/pipeline.rs:436— FunctionTooLong — daft_local_execution::pipeline::physical_plan_to_pipeline runs 1062 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 962 over it, 10.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_local_plan::translate::translate_helper src/daft-local-plan/src/translate.rs:29— FunctionTooLong — daft_local_plan::translate::translate_helper runs 520 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 420 over it, 5.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_local_plan::agg::populate_aggregation_stages_bound_with_schema src/daft-local-plan/src/agg.rs:28— FunctionTooLong — daft_local_plan::agg::populate_aggregation_stages_bound_with_schema runs 277 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: page.QueryPageInner REDACTED:64— FunctionTooLong — QueryPageInner runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_io::object_store_glob::glob src/daft-io/src/object_store_glob.rs:352— FunctionTooLong — daft_io::object_store_glob::glob runs 214 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_logical_plan::ops::project::replace_column_with_semantic_id src/daft-logical-plan/src/ops/project.rs:268— FunctionTooLong — daft_logical_plan::ops::project::replace_column_with_semantic_id runs 212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_sql::modules::config::expr_to_iocfg src/daft-sql/src/modules/config.rs:457— FunctionTooLong — daft_sql::modules::config::expr_to_iocfg runs 189 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_recordbatch::ops::inline_agg::try_create_accumulator src/daft-recordbatch/src/ops/inline_agg.rs:598— FunctionTooLong — daft_recordbatch::ops::inline_agg::try_create_accumulator runs 187 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_ext_macros::daft_func_impl src/daft-ext-macros/src/lib.rs:340— FunctionTooLong — daft_ext_macros::daft_func_impl runs 173 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_writers::csv_writer::make_csv_writer src/daft-writers/src/csv_writer.rs:168— FunctionTooLong — daft_writers::csv_writer::make_csv_writer runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_scan::expr_rewriter::rewrite_predicate_for_partitioning src/daft-scan/src/expr_rewriter.rs:84— FunctionTooLong — daft_scan::expr_rewriter::rewrite_predicate_for_partitioning runs 162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_core::utils::supertype::get_supertype src/daft-core/src/utils/supertype.rs:43— FunctionTooLong — daft_core::utils::supertype::get_supertype runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_logical_plan::ops::project::replace_column_with_semantic_id_aggexpr src/daft-logical-plan/src/ops/project.rs:549— FunctionTooLong — daft_logical_plan::ops::project::replace_column_with_semantic_id_aggexpr runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_io::s3_like::build_s3_conf src/daft-io/src/s3_like.rs:503— FunctionTooLong — daft_io::s3_like::build_s3_conf runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_sql::schema::sql_dtype_to_dtype src/daft-sql/src/schema.rs:78— FunctionTooLong — daft_sql::schema::sql_dtype_to_dtype runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_dashboard::generate_interactive_html src/daft-dashboard/src/lib.rs:84— FunctionTooLong — daft_dashboard::generate_interactive_html runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: physical-plan-tree.PhysicalPlanTree src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:278— FunctionTooLong — PhysicalPlanTree runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_writers::json_writer::make_json_writer src/daft-writers/src/json_writer.rs:134— FunctionTooLong — daft_writers::json_writer::make_json_writer runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: physical-plan-tree.PhysicalNodeCard src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:115— FunctionTooLong — PhysicalNodeCard runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_logical_plan::optimization::rules::unnest_subquery::pull_up_correlated_cols src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:384— FunctionTooLong — daft_logical_plan::optimization::rules::unnest_subquery::pull_up_correlated_cols runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: tasks-sidebar.TasksSidebar src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:41— FunctionTooLong — TasksSidebar runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_recordbatch::repr_html::html_value src/daft-recordbatch/src/repr_html.rs:5— FunctionTooLong — daft_recordbatch::repr_html::html_value runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: progress-table.ProgressTable src/daft-dashboard/frontend/src/app/query/progress-table.tsx:36— FunctionTooLong — ProgressTable runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_json::read::read_json_single_into_stream src/daft-json/src/read.rs:410— FunctionTooLong — daft_json::read::read_json_single_into_stream runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: daft_micropartition::micropartition::read_parquet_into_micropartition src/daft-micropartition/src/micropartition.rs:621— FunctionTooLong — daft_micropartition::micropartition::read_parquet_into_micropartition runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (11 lines × 2) src/common/image/src/image.rs:65— src/common/image/src/image.rs:65-75 | src/common/image/src/image.rs:77-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) src/daft-core/src/array/growable/python_growable.rs:30— src/daft-core/src/array/growable/python_growable.rs:30-41 | src/daft-core/src/array/growable/struct_growable.rs:45-55 — before extracting anything, compare `src/daft-core/src/array/growable/python_growable.rs` and `src/daft-core/src/array/growable/struct_growable.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/growable/python_growable.rs:30` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-core/src/array/growable/python_growable.rs:42` calls `with_capacity` and `src/daft-core/src/array/growable/struct_growable.rs:56` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/daft-core/src/array/serdes.rs:144— src/daft-core/src/array/serdes.rs:144-154 | src/daft-core/src/array/serdes.rs:196-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/serdes.rs:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-csv/src/read.rs:116— src/daft-csv/src/read.rs:116-126 | src/daft-warc/src/lib.rs:459-469 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-warc/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:116` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-decoding/src/deserialize.rs:155— src/daft-decoding/src/deserialize.rs:155-165 | src/daft-decoding/src/deserialize.rs:173-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-decoding/src/deserialize.rs:155` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-distributed/src/pipeline_node/filter.rs:38— src/daft-distributed/src/pipeline_node/filter.rs:38-48 | src/daft-local-execution/src/intermediate_ops/filter.rs:48-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/filter.rs:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-dsl/src/python_udaf.rs:71— src/daft-dsl/src/python_udaf.rs:71-81 | src/daft-dsl/src/python_udaf.rs:105-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udaf.rs:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-dsl/src/python_udaf.rs:82` calls `as_ref` and `src/daft-dsl/src/python_udaf.rs:116` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/daft-functions/src/distance/cosine.rs:9— src/daft-functions/src/distance/cosine.rs:9-19 | src/daft-functions/src/similarity/cosine.rs:9-19 — `src/daft-functions/src/distance/cosine.rs` and `src/daft-functions/src/similarity/cosine.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 31 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (11 lines × 2) src/daft-functions/src/similarity/bitwise_hamming.rs:119— src/daft-functions/src/similarity/bitwise_hamming.rs:119-129 | src/daft-functions/src/similarity/bitwise_hamming.rs:169-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/similarity/bitwise_hamming.rs:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:177— src/daft-local-execution/src/join/left_right_join.rs:177-187 | src/daft-local-execution/src/join/left_right_join.rs:226-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/daft-logical-plan/src/ops/asof_join.rs:199— src/daft-logical-plan/src/ops/asof_join.rs:199-209 | src/daft-logical-plan/src/ops/join.rs:305-315 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/asof_join.rs:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-micropartition/src/python.rs:341— src/daft-micropartition/src/python.rs:341-351 | src/daft-recordbatch/src/python.rs:120-130 — before extracting anything, compare `src/daft-micropartition/src/python.rs` and `src/daft-recordbatch/src/python.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-micropartition/src/python.rs:341` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:296— src/daft-recordbatch/src/ops/inline_agg.rs:296-306 | src/daft-recordbatch/src/ops/inline_agg.rs:359-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) src/daft-recordbatch/src/ops/window_states/sum.rs:67— src/daft-recordbatch/src/ops/window_states/sum.rs:67-77 | src/daft-recordbatch/src/ops/window_states/sum.rs:89-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/window_states/sum.rs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-scan/src/python.rs:887— src/daft-scan/src/python.rs:887-897 | src/daft-scan/src/python.rs:936-946 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/python.rs:887` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-algebra/src/simplify/numeric.rs:49— src/daft-algebra/src/simplify/numeric.rs:49-59 | src/daft-algebra/src/simplify/numeric.rs:70-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-algebra/src/simplify/numeric.rs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-core/src/array/ops/comparison.rs:389— src/daft-core/src/array/ops/comparison.rs:389-399 | src/daft-core/src/array/ops/comparison.rs:497-507 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/comparison.rs:389` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `lhs` to `Option<Series>` in one and `&StructArray` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:116— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:116-126 | src/daft-distributed/src/pipeline_node/join/stats.rs:93-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) src/daft-csv/src/read.rs:155— src/daft-csv/src/read.rs:155-165 | src/daft-parquet/src/read.rs:401-411 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-parquet/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/daft-ext-internal/src/aggregate.rs:29— src/daft-ext-internal/src/aggregate.rs:29-39 | src/daft-ext-internal/src/function.rs:40-50 — before extracting anything, compare `src/daft-ext-internal/src/aggregate.rs` and `src/daft-ext-internal/src/function.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/daft-local-execution/src/sinks/gather.rs:138— src/daft-local-execution/src/sinks/gather.rs:138-148 | src/daft-local-execution/src/sinks/into_partitions.rs:194-204 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/gather.rs:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-core/src/array/fixed_size_list_array.rs:180— src/daft-core/src/array/fixed_size_list_array.rs:180-190 | src/daft-core/src/array/list_array.rs:191-201 — before extracting anything, compare `src/daft-core/src/array/fixed_size_list_array.rs` and `src/daft-core/src/array/list_array.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/fixed_size_list_array.rs:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-core/src/array/list_array.rs:203` calls `clone` and `src/daft-core/src/array/fixed_size_list_array.rs:192` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/daft-ext-macros/src/types.rs:297— src/daft-ext-macros/src/types.rs:297-307 | src/daft-ext-macros/src/types.rs:330-340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext-macros/src/types.rs:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/daft-ext-macros/src/types.rs:147— src/daft-ext-macros/src/types.rs:147-157 | src/daft-ext-macros/src/types.rs:183-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext-macros/src/types.rs:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/common/io-config/src/goosefs.rs:172— src/common/io-config/src/goosefs.rs:172-182 | src/common/io-config/src/hdfs.rs:51-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/io-config/src/goosefs.rs:172` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
+ 3 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×25
Edited copy of a member (18 corresponding lines) src/daft-functions-utf8/src/regexp_extract.rs:57— src/daft-functions-utf8/src/regexp_extract.rs:57-75 | src/daft-functions-utf8/src/regexp_extract_all.rs:59-80 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-micropartition/src/micropartition.rs:214— src/daft-micropartition/src/micropartition.rs:214-232 | src/daft-recordbatch/src/lib.rs:1931-1948 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-199 | src/daft-recordbatch/src/ops/inline_agg.rs:436-463 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-200 | src/daft-recordbatch/src/ops/inline_agg.rs:436-467 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-201 | src/daft-recordbatch/src/ops/inline_agg.rs:436-468 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-202 | src/daft-recordbatch/src/ops/inline_agg.rs:436-469 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-211 | src/daft-recordbatch/src/ops/inline_agg.rs:436-460 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-212 | src/daft-recordbatch/src/ops/inline_agg.rs:436-461 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-213 | src/daft-recordbatch/src/ops/inline_agg.rs:436-462 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-215 | src/daft-recordbatch/src/ops/inline_agg.rs:436-464 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-216 | src/daft-recordbatch/src/ops/inline_agg.rs:436-465 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:176— src/daft-recordbatch/src/ops/inline_agg.rs:176-217 | src/daft-recordbatch/src/ops/inline_agg.rs:436-466 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs:250— src/daft-core/src/array/fixed_size_list_array.rs:250-269 | src/daft-core/src/array/list_array.rs:240-257 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-parquet/src/reader/chunk_source.rs:202— src/daft-parquet/src/reader/chunk_source.rs:202-219 | src/daft-parquet/src/reader/chunk_source.rs:221-240 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/common/metrics/src/snapshot.rs:172— src/common/metrics/src/snapshot.rs:172-189 | src/common/metrics/src/snapshot.rs:234-251 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-json/src/local.rs:39— src/daft-json/src/local.rs:39-56 | src/daft-json/src/read.rs:273-292 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/common/metrics/src/meters.rs:34— src/common/metrics/src/meters.rs:34-51 | src/common/metrics/src/meters.rs:75-92 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-context/src/lib.rs:265— src/daft-context/src/lib.rs:265-285 | src/daft-context/src/lib.rs:290-307 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-core/src/python/series.rs:282— src/daft-core/src/python/series.rs:282-299 | src/daft-recordbatch/src/python.rs:449-469 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-local-execution/src/checkpoint_terminus.rs:76— src/daft-local-execution/src/checkpoint_terminus.rs:76-93 | src/daft-local-execution/src/concat.rs:114-131 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-logical-plan/src/builder/mod.rs:399— src/daft-logical-plan/src/builder/mod.rs:399-416 | src/daft-logical-plan/src/builder/mod.rs:423-440 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-logical-plan/src/ops/set_operations.rs:68— src/daft-logical-plan/src/ops/set_operations.rs:68-96 | src/daft-recordbatch/src/lib.rs:85-102 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-functions-utf8/src/chr.rs:87— src/daft-functions-utf8/src/chr.rs:87-108 | src/daft-functions-utf8/src/space.rs:86-103 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-micropartition/src/python.rs:512— src/daft-micropartition/src/python.rs:512-529 | src/daft-recordbatch/src/python.rs:271-288 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/daft-logical-plan/src/ops/concat.rs:28— src/daft-logical-plan/src/ops/concat.rs:28-46 | src/daft-logical-plan/src/ops/filter.rs:31-48 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×25
Edited copy of a member (10 corresponding lines) src/daft-logical-plan/src/sink_info.rs:84— src/daft-logical-plan/src/sink_info.rs:84-93 | src/daft-logical-plan/src/sink_info.rs:152-161 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/catalog/__unity/_client.py:133— daft/catalog/__unity/_client.py:133-142 | daft/catalog/__unity/_client.py:145-154 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/subscribers/event_log.py:211— daft/subscribers/event_log.py:211-223 | daft/subscribers/event_log.py:298-307 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-distributed/src/statistics/mod.rs:260— src/daft-distributed/src/statistics/mod.rs:260-275 | src/daft-distributed/src/statistics/mod.rs:277-286 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/catalog/__glue.py:119— daft/catalog/__glue.py:119-137 | daft/catalog/__s3tables.py:136-145 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-core/src/array/ops/compare_agg.rs:261— src/daft-core/src/array/ops/compare_agg.rs:261-270 | src/daft-core/src/array/ops/compare_agg.rs:271-280 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-distributed/src/pipeline_node/explode.rs:157— src/daft-distributed/src/pipeline_node/explode.rs:157-167 | src/daft-local-execution/src/intermediate_ops/explode.rs:150-159 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/common/treenode/src/lib.rs:225— src/common/treenode/src/lib.rs:225-234 | src/common/treenode/src/lib.rs:257-267 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/recordbatch/micropartition.py:258— daft/recordbatch/micropartition.py:258-269 | daft/recordbatch/recordbatch.py:299-308 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/common/metrics/src/snapshot.rs:71— src/common/metrics/src/snapshot.rs:71-80 | src/common/metrics/src/snapshot.rs:491-501 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-core/src/array/ops/full.rs:95— src/daft-core/src/array/ops/full.rs:95-107 | src/daft-core/src/array/ops/full.rs:131-140 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-ai/src/python.rs:24— src/daft-ai/src/python.rs:24-33 | src/daft-catalog/src/python/wrappers.rs:32-43 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-schema/src/dtype.rs:889— src/daft-schema/src/dtype.rs:889-898 | src/daft-schema/src/dtype.rs:913-922 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-sql/src/modules/image/crop.rs:14— src/daft-sql/src/modules/image/crop.rs:14-23 | src/daft-sql/src/modules/map.rs:24-33 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/common/io-config/src/hdfs.rs:25— src/common/io-config/src/hdfs.rs:25-34 | src/common/io-config/src/unity.rs:14-23 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-distributed/src/scheduling/scheduler/linear.rs:144— src/daft-distributed/src/scheduling/scheduler/linear.rs:144-154 | src/daft-distributed/src/scheduling/scheduler/default.rs:156-165 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-writers/src/file.rs:308— src/daft-writers/src/file.rs:308-317 | src/daft-writers/src/partition.rs:223-232 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-local-execution/src/sinks/blocking_sink.rs:89— src/daft-local-execution/src/sinks/blocking_sink.rs:89-100 | src/daft-local-execution/src/streaming_sink/base.rs:101-110 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/ai/google/provider.py:56— daft/ai/google/provider.py:56-65 | daft/ai/openai/provider.py:64-73 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-distributed/src/pipeline_node/mod.rs:480— src/daft-distributed/src/pipeline_node/mod.rs:480-489 | src/daft-local-execution/src/pipeline.rs:386-395 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-dsl/src/expr/mod.rs:1315— src/daft-dsl/src/expr/mod.rs:1315-1324 | src/daft-dsl/src/functions/sketch/mod.rs:43-52 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/daft-functions-binary/src/codecs.rs:47— src/daft-functions-binary/src/codecs.rs:47-56 | src/daft-image/src/functions/hash_method.rs:53-62 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/ai/transformers/protocols/image_classifier.py:94— daft/ai/transformers/protocols/image_classifier.py:94-104 | daft/ai/transformers/protocols/text_classifier.py:73-82 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/io/bigtable/bigtable_data_sink.py:204— daft/io/bigtable/bigtable_data_sink.py:204-213 | daft/io/turbopuffer/turbopuffer_data_sink.py:224-234 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) daft/recordbatch/micropartition.py:510— daft/recordbatch/micropartition.py:510-519 | daft/recordbatch/recordbatch.py:530-539 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×23
Change coupling: batch.rs ↔ row_wise.rs src/daft-dsl/src/python_udf/batch.rs:1— `src/daft-dsl/src/python_udf/batch.rs` and `src/daft-dsl/src/python_udf/row_wise.rs` change together 100% of the time (10 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `8284af4f` feat(udf): support ray_options and resource overrides in UDF v2 (#5982); `4400e697` fix: Clean up UDF display name in progress bar and plans (#5810); `b3e8263b` fix: Supporting fractional gpu count on class udf (#5840) — run `git show` on any of them.
Change coupling: file_path.py ↔ ray_runner.py daft/io/file_path.py:1— `daft/io/file_path.py` and `daft/runners/ray_runner.py` change together 85% of the time (11 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `e9214cc8` feat: support glob multiple path (#4811); `79de420a` perf: Don't concat in `micropartition.to_arrow()` (#4192); `e37c6d3a` [CHORE]: remove daft-table dependency from daft-logical-plan (#3265) — run `git show` on any of them.
Change coupling: dataframe.py ↔ map_partition_ops.py daft/dataframe/dataframe.py:1— `daft/dataframe/dataframe.py` and `daft/logical/map_partition_ops.py` change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `21afa098` feat: `index_col` option in `explode` (#5842); `d03b2671` [RUST] Explode List types (#824); `04ab5838` expressions -> expressions2 — run `git show` on any of them.
Change coupling: in_memory.rs ↔ scan_task.rs src/daft-local-execution/src/sources/in_memory.rs:1— `src/daft-local-execution/src/sources/in_memory.rs` and `src/daft-local-execution/src/sources/scan_task.rs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `b1ea3b97` [CHORE] Enable sources to return empty tables (#2915); `39cd0ad5` [CHORE] Add error snafus for local executor (#2660); `b15b0c7f` [FEAT] Example Analyze for Local Execution Engine (#2648) — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs src/daft-core/src/array/ops/mod.rs:1— `src/daft-core/src/array/ops/mod.rs` and `src/daft-core/src/series/ops/mod.rs` change together 74% of the time (40 of the 54 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 40 shared commits counted here, the most recent 3 are `3de673fa` feat(distributed): enable two-stage HLL aggregation for approx_count_…; `1c97c27f` feat: Add pow expression (#5237); `5549d16b` feat: add binary string operations (length and concatenation) (#3646) — run `git show` on any of them.
Change coupling: anonymous.rs ↔ glob.rs src/daft-scan/src/anonymous.rs:1— `src/daft-scan/src/anonymous.rs` and `src/daft-scan/src/glob.rs` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `e1c3fafa` [FEAT]: expr simplifier (#3393); `c694c9ef` [FEAT] Include file paths as column from read_parquet/csv/json (#2953); `c24635e7` [FEAT] Support Reading Iceberg Merge-on-Read Position Deletes (#2563) — run `git show` on any of them.
Change coupling: worker_manager.rs ↔ default.rs src/daft-distributed/src/python/ray/worker_manager.rs:1— `src/daft-distributed/src/python/ray/worker_manager.rs` and `src/daft-distributed/src/scheduling/scheduler/default.rs` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4c526927` fix: incrementally ramp up Ray autoscaler resource requests to avoid …; `dc90bb16` fix: Propagate worker failures to scheduler (#4800); `8929963a` feat(flotilla): Non-actor UDFs with gpu requirements (#4731) — run `git show` on any of them.
Change coupling: download.rs ↔ upload.rs src/daft-functions-uri/src/download.rs:1— `src/daft-functions-uri/src/download.rs` and `src/daft-functions-uri/src/upload.rs` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `444d129c` refactor(arrow2): remove deprecated methods from daft-functions-uri c…; `db44f0b4` chore: Don't log failures in url download if `on_error="null"` (#5231); `f29dd714` chore: rename block_on method to convey intent (#4474) — run `git show` on any of them.
Change coupling: native_runner.py ↔ ray_runner.py daft/runners/native_runner.py:1— `daft/runners/native_runner.py` and `daft/runners/ray_runner.py` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `211047f9` feat(cli): show query id in CLI output (#6755); `f7d061a6` feat(dashboard): subscriber heartbeat and dead query detection (#6676); `61b0d529` feat(dashboard): display version metadata on query detail page (#6671) — run `git show` on any of them.
Change coupling: utf8.rs ↔ series.rs src/daft-core/src/array/ops/utf8.rs:1— `src/daft-core/src/array/ops/utf8.rs` and `src/daft-core/src/python/series.rs` change together 61% of the time (25 of the 41 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `6fe408c5` [FEAT] Adds str.length_bytes() function (#2775); `8544b763` [FEAT] Add `.str.count_matches()` (#2580); `29b02a14` [FEAT] String normalize expression (#2450) — run `git show` on any of them.
Change coupling: mod.rs ↔ dispatcher.rs src/daft-distributed/src/plan/mod.rs:1— `src/daft-distributed/src/plan/mod.rs` and `src/daft-distributed/src/scheduling/dispatcher.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b853f269` refactor(daft-distributed): cleanup of statistics_manager (#6718); `86ede0a1` fix(flotilla): Change MaterializedOutput to return a Vec<Partitions> …; `a7b81b67` chore: add additional context to the runtime stats events (#4520) — run `git show` on any of them.
Change coupling: push_down_filter.rs ↔ unnest_subquery.rs src/daft-logical-plan/src/optimization/rules/push_down_filter.rs:1— `src/daft-logical-plan/src/optimization/rules/push_down_filter.rs` and `src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `040c09fd` feat: Point-in-Time / ASOF Joins (#6615); `075f4342` chore: Replace RepartitionSpec::IntoPartitions with custom path (#6349); `23508c49` feat: implement into_batches on the swordfish native daft runner (#4935) — run `git show` on any of them.
Change coupling: push_down_projection.rs ↔ unnest_subquery.rs src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:1— `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs` and `src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `040c09fd` feat: Point-in-Time / ASOF Joins (#6615); `075f4342` chore: Replace RepartitionSpec::IntoPartitions with custom path (#6349); `23508c49` feat: implement into_batches on the swordfish native daft runner (#4935) — run `git show` on any of them.
Change coupling: filter.rs ↔ write.rs src/daft-local-execution/src/intermediate_ops/filter.rs:1— `src/daft-local-execution/src/intermediate_ops/filter.rs` and `src/daft-local-execution/src/sinks/write.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `8b7e5566` feat(stats): Add num_tasks metric tracking across all runtime stats (…; `0e952010` feat(observability): track per-operator bytes_in / bytes_out (#6612); `2b8cb910` feat: Support additional `OTEL_*` configuration envs (#6148) — run `git show` on any of them.
Change coupling: intermediate_op.rs ↔ in_memory.rs src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:1— `src/daft-local-execution/src/intermediate_ops/intermediate_op.rs` and `src/daft-local-execution/src/sources/in_memory.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `39cd0ad5` [CHORE] Add error snafus for local executor (#2660); `b15b0c7f` [FEAT] Example Analyze for Local Execution Engine (#2648); `702ac737` [PERF] Swordfish Dynamic Pipelines (#2599) — run `git show` on any of them.
Change coupling: worker_manager.rs ↔ scheduler_actor.rs src/daft-distributed/src/python/ray/worker_manager.rs:1— `src/daft-distributed/src/python/ray/worker_manager.rs` and `src/daft-distributed/src/scheduling/scheduler/scheduler_actor.rs` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `69fe81e7` feat(ray): Implement dynamic scale-in for RaySwordfishActor (#5903); `d7561632` fix(scheduler): include dispatched tasks in autoscaling ratio (#6388); `8929963a` feat(flotilla): Non-actor UDFs with gpu requirements (#4731) — run `git show` on any of them.
Change coupling: project.rs ↔ partitioning.rs src/daft-logical-plan/src/ops/project.rs:1— `src/daft-logical-plan/src/ops/project.rs` and `src/daft-logical-plan/src/partitioning.rs` change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `486f6c63` fix: short-circuit evaluation for coalesce (#6525); `c113e359` feat: batch UDF with `@daft.func.batch` (#5362); `cd6ebd56` feat: add `use_process` flag for `@daft.func(...)` (#5323) — run `git show` on any of them.
Change coupling: repartition.rs ↔ translate.rs src/daft-distributed/src/pipeline_node/shuffles/repartition.rs:1— `src/daft-distributed/src/pipeline_node/shuffles/repartition.rs` and `src/daft-distributed/src/pipeline_node/translate.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `75d5a2c8` refactor(flight): implement into_partitions for flight shuffle (#6764); `12301c7a` feat: implement distributed sort in flotilla engine (#4991); `4dd0d98d` feat: Flotilla pre-shuffle merge (#4873) — run `git show` on any of them.
Change coupling: time.rs ↔ series.rs src/daft-core/src/array/ops/time.rs:1— `src/daft-core/src/array/ops/time.rs` and `src/daft-core/src/python/series.rs` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `550072e8` feat: temporal functions `quarter`, `unix_date`, `unix_micros`, `unix…; `398d79c3` feat: day_of_month and week_of_year (#4284); `923ff62b` feat: add `strftime` (#4146) — run `git show` on any of them.
Change coupling: limit.rs ↔ scan_source.rs src/daft-distributed/src/pipeline_node/limit.rs:1— `src/daft-distributed/src/pipeline_node/limit.rs` and `src/daft-distributed/src/pipeline_node/scan_source.rs` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `8b7e5566` feat(stats): Add num_tasks metric tracking across all runtime stats (…; `0e952010` feat(observability): track per-operator bytes_in / bytes_out (#6612); `b39f79a7` refactor: remove EmptyScan plan node (#6275) — run `git show` on any of them.
Change coupling: __iceberg.py ↔ session.py daft/catalog/__iceberg.py:1— `daft/catalog/__iceberg.py` and `daft/session.py` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `a9ddee33` fix: Re-enable mypy (#4160); `ad0862b0` feat: adds has_table and has_namespace catalog methods (#4088); `4abe1262` fix: surface non 'NotFound' errors during table resolution (#4073) — run `git show` on any of them.
Change coupling: REDACTED ↔ engine.rs REDACTED:1— `REDACTED` and `src/daft-dashboard/src/engine.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `f7d061a6` feat(dashboard): subscriber heartbeat and dead query detection (#6676); `61b0d529` feat(dashboard): display version metadata on query detail page (#6671); `d448058c` feat: Use JSON Serialization for Plans in Subscribers (#5709) — run `git show` on any of them.
Duplicated block (12 lines × 2) src/daft-csv/src/local.rs:316— src/daft-csv/src/local.rs:316-327 | src/daft-csv/src/read.rs:575-586 — before extracting anything, compare `src/daft-csv/src/local.rs` and `src/daft-csv/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/local.rs:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-csv/src/read.rs:226— src/daft-csv/src/read.rs:226-237 | src/daft-parquet/src/read.rs:211-222 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-parquet/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-dashboard/src/engine.rs:701— src/daft-dashboard/src/engine.rs:701-712 | src/daft-dashboard/src/engine.rs:721-732 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/daft-distributed/src/pipeline_node/join/asof_join.rs:688— src/daft-distributed/src/pipeline_node/join/asof_join.rs:688-699 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:283-294 — before extracting anything, compare `src/daft-distributed/src/pipeline_node/join/asof_join.rs` and `src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:327— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:327-338 | src/daft-distributed/src/pipeline_node/join/key_filtering_join.rs:356-367 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:327` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-dsl/src/python_udaf.rs:83— src/daft-dsl/src/python_udaf.rs:83-94 | src/daft-dsl/src/python_udaf.rs:116-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udaf.rs:83` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-dsl/src/python_udaf.rs:80` calls `as_ref` and `src/daft-dsl/src/python_udaf.rs:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) src/daft-functions-utf8/src/chr.rs:32— src/daft-functions-utf8/src/chr.rs:32-43 | src/daft-functions-utf8/src/space.rs:31-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/chr.rs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-functions-utf8/src/damerau_levenshtein.rs:10— src/daft-functions-utf8/src/damerau_levenshtein.rs:10-21 | src/daft-functions-utf8/src/levenshtein.rs:9-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) src/daft-functions-utf8/src/split_part.rs:116— src/daft-functions-utf8/src/split_part.rs:116-127 | src/daft-functions-utf8/src/substring_index.rs:114-125 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/split_part.rs:116` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) src/daft-image/src/functions/decode.rs:45— src/daft-image/src/functions/decode.rs:45-56 | src/daft-image/src/functions/decode_image_file.rs:49-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-image/src/functions/decode.rs:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) src/daft-io/src/gravitino.rs:99— src/daft-io/src/gravitino.rs:99-110 | src/daft-io/src/unity.rs:79-90 — before extracting anything, compare `src/daft-io/src/gravitino.rs` and `src/daft-io/src/unity.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/gravitino.rs:99` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) src/daft-io/src/gravitino.rs:133— src/daft-io/src/gravitino.rs:133-144 | src/daft-io/src/unity.rs:113-124 — before extracting anything, compare `src/daft-io/src/gravitino.rs` and `src/daft-io/src/unity.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/gravitino.rs:133` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-local-execution/src/join/outer_join.rs:67— src/daft-local-execution/src/join/outer_join.rs:67-78 | src/daft-local-execution/src/join/outer_join.rs:173-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/daft-logical-plan/src/optimization/rules/filter_null_join_key.rs:114— src/daft-logical-plan/src/optimization/rules/filter_null_join_key.rs:114-125 | src/daft-logical-plan/src/optimization/rules/filter_null_join_key.rs:126-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/filter_null_join_key.rs:114` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-micropartition/src/ops/partition.rs:42— src/daft-micropartition/src/ops/partition.rs:42-53 | src/daft-micropartition/src/ops/partition.rs:60-71 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/daft-sql/src/planner.rs:658— src/daft-sql/src/planner.rs:658-670 | src/daft-sql/src/planner.rs:806-817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/planner.rs:806` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-functions-utf8/src/lpad.rs:40— src/daft-functions-utf8/src/lpad.rs:40-51 | src/daft-functions-utf8/src/rpad.rs:40-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/lpad.rs:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/daft-functions-utf8/src/left.rs:38— src/daft-functions-utf8/src/left.rs:38-49 | src/daft-functions-utf8/src/right.rs:45-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/left.rs:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) daft/catalog/__postgres.py:417— daft/catalog/__postgres.py:417-428 | daft/catalog/__postgres.py:432-443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) daft/recordbatch/micropartition.py:315— daft/recordbatch/micropartition.py:315-326 | daft/recordbatch/micropartition.py:346-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `daft/recordbatch/micropartition.py:315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) daft/recordbatch/recordbatch.py:342— daft/recordbatch/recordbatch.py:342-353 | daft/recordbatch/recordbatch.py:367-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `daft/recordbatch/recordbatch.py:342` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) daft/udf/execution.py:88— daft/udf/execution.py:88-99 | daft/udf/execution.py:117-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) src/daft-core/src/array/ops/arithmetic.rs:263— src/daft-core/src/array/ops/arithmetic.rs:263-267 | src/daft-core/src/array/ops/arithmetic.rs:303-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/arithmetic.rs:263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/daft-core/src/array/ops/full.rs:162— src/daft-core/src/array/ops/full.rs:162-166 | src/daft-core/src/array/ops/full.rs:202-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/daft-functions-temporal/src/time.rs:242— src/daft-functions-temporal/src/time.rs:242-246 | src/daft-functions-temporal/src/time.rs:323-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/time.rs:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) src/daft-functions-utf8/src/pad.rs:110— src/daft-functions-utf8/src/pad.rs:110-114 | src/daft-functions-utf8/src/repeat.rs:100-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/pad.rs:110` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/daft-logical-plan/src/optimization/rules/granular_projections.rs:189— src/daft-logical-plan/src/optimization/rules/granular_projections.rs:189-193 | src/daft-logical-plan/src/optimization/rules/granular_projections.rs:206-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:219— src/daft-recordbatch/src/ops/inline_agg.rs:219-223 | src/daft-recordbatch/src/ops/inline_agg.rs:224-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:237— src/daft-recordbatch/src/ops/inline_agg.rs:237-241 | src/daft-recordbatch/src/ops/inline_agg.rs:242-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:1142— src/daft-recordbatch/src/ops/inline_agg.rs:1142-1147 | src/daft-recordbatch/src/ops/inline_agg.rs:1403-1407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:1142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:1301— src/daft-recordbatch/src/ops/inline_agg.rs:1301-1305 | src/daft-recordbatch/src/ops/inline_agg.rs:1309-1313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:1301` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/daft-dsl/src/python_udf/batch.rs:88— src/daft-dsl/src/python_udf/batch.rs:88-92 | src/daft-dsl/src/python_udf/row_wise.rs:84-88 — before extracting anything, compare `src/daft-dsl/src/python_udf/batch.rs` and `src/daft-dsl/src/python_udf/row_wise.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/daft-ext/src/aggregate.rs:160— src/daft-ext/src/aggregate.rs:160-164 | src/daft-ext/src/function.rs:93-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/daft-micropartition/src/python.rs:1005— src/daft-micropartition/src/python.rs:1005-1009 | src/daft-recordbatch/src/python.rs:603-607 — before extracting anything, compare `src/daft-micropartition/src/python.rs` and `src/daft-recordbatch/src/python.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/daft-micropartition/src/python.rs:1012— src/daft-micropartition/src/python.rs:1012-1016 | src/daft-recordbatch/src/python.rs:597-601 — before extracting anything, compare `src/daft-micropartition/src/python.rs` and `src/daft-recordbatch/src/python.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/daft-core/src/datatypes/infer_datatype.rs:239— src/daft-core/src/datatypes/infer_datatype.rs:239-246 | src/daft-core/src/datatypes/infer_datatype.rs:345-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/datatypes/infer_datatype.rs:239` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) src/daft-core/src/series/from_lit.rs:348— src/daft-core/src/series/from_lit.rs:348-352 | src/daft-core/src/series/from_lit.rs:369-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/from_lit.rs:369` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) src/daft-micropartition/src/python.rs:1028— src/daft-micropartition/src/python.rs:1028-1032 | src/daft-micropartition/src/python.rs:1097-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-micropartition/src/python.rs:1028` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/daft-core/src/array/ops/full.rs:148— src/daft-core/src/array/ops/full.rs:148-152 | src/daft-core/src/array/ops/full.rs:178-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/daft-local-execution/src/run.rs:636— src/daft-local-execution/src/run.rs:636-640 | src/daft-local-execution/src/run.rs:650-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:952— src/daft-recordbatch/src/ops/inline_agg.rs:952-956 | src/daft-recordbatch/src/ops/inline_agg.rs:1041-1045 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) benchmarking/vllm/naive-batch-sorted.py:29— benchmarking/vllm/naive-batch-sorted.py:29-33 | benchmarking/vllm/naive-batch.py:29-33 — before extracting anything, compare `benchmarking/vllm/naive-batch-sorted.py` and `benchmarking/vllm/naive-batch.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) daft/ai/transformers/protocols/image_classifier.py:46— daft/ai/transformers/protocols/image_classifier.py:46-50 | daft/ai/transformers/protocols/text_classifier.py:50-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) daft/ai/transformers/protocols/image_embedder.py:46— daft/ai/transformers/protocols/image_embedder.py:46-50 | daft/ai/transformers/protocols/text_embedder.py:58-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
ClassTooLong: LocalPhysicalPlan src/daft-local-plan/src/plan.rs:74— ClassTooLong — 1646 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 52 methods, 4 blocks, lines 74-1971. The bar is 400 significant lines; this is 1246 over it, 4.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SQLPlanner src/daft-sql/src/planner.rs:165— ClassTooLong — 1455 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 4 blocks, lines 165-2293. The bar is 400 significant lines; this is 1055 over it, 3.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RecordBatch src/daft-recordbatch/src/lib.rs:68— ClassTooLong — 1310 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 94 methods, 9 blocks, lines 68-2060. The bar is 400 significant lines; this is 910 over it, 3.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Expr src/daft-dsl/src/expr/mod.rs:222— ClassTooLong — 990 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 71 methods, 3 blocks, lines 222-2552. The bar is 400 significant lines; this is 590 over it, 2.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LogicalPlan src/daft-logical-plan/src/logical_plan.rs:35— ClassTooLong — 902 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 21 methods, 4 blocks, lines 35-1223. The bar is 400 significant lines; this is 502 over it, 2.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LogicalPlanBuilder src/daft-logical-plan/src/builder/mod.rs:61— ClassTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 55 methods, 5 blocks, lines 61-1233. The bar is 400 significant lines; this is 389 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PyMicroPartition src/daft-micropartition/src/python.rs:32— ClassTooLong — 772 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 4 blocks, lines 32-1273. The bar is 400 significant lines; this is 372 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DataType src/daft-schema/src/dtype.rs:17— ClassTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 71 methods, 6 blocks, lines 17-1144. The bar is 400 significant lines; this is 298 over it, 1.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: S3LikeSource src/daft-io/src/s3_like.rs:71— ClassTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 3 blocks, lines 71-1564. The bar is 400 significant lines; this is 216 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AsofJoinNode src/daft-distributed/src/pipeline_node/join/asof_join.rs:42— ClassTooLong — 484 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 3 blocks, lines 42-700. The bar is 400 significant lines; this is 84 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LogicalPlanToPipelineNodeTranslator src/daft-distributed/src/pipeline_node/translate.rs:58— ClassTooLong — 481 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 3 blocks, lines 58-697. The bar is 400 significant lines; this is 81 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GlobScanOperator src/daft-scan/src/glob.rs:28— ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 3 blocks, lines 28-793. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AggExpr src/daft-dsl/src/expr/mod.rs:341— ClassTooLong — 469 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 2 blocks, lines 341-1049. The bar is 400 significant lines; this is 69 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AzureBlobSource src/daft-io/src/azure_blob.rs:388— ClassTooLong — 459 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 3 blocks, lines 388-1061. The bar is 400 significant lines; this is 59 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PyLogicalPlanBuilder src/daft-logical-plan/src/builder/mod.rs:1246— ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 4 blocks, lines 1246-1846. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PushDownProjection src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:21— ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 2 blocks, lines 23-687. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Literal src/daft-core/src/lit/mod.rs:36— ClassTooLong — 444 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 4 blocks, lines 36-688. The bar is 400 significant lines; this is 44 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PyRecordBatch src/daft-recordbatch/src/python.rs:26— ClassTooLong — 434 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 41 methods, 4 blocks, lines 26-628. The bar is 400 significant lines; this is 34 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RayWorkerManager src/daft-distributed/src/python/ray/worker_manager.rs:156— ClassTooLong — 407 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 4 methods, 4 blocks, lines 156-784. The bar is 400 significant lines; this is 7 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×19
Edited copy of a member (12 corresponding lines) src/daft-functions/src/numeric/exp.rs:77— src/daft-functions/src/numeric/exp.rs:77-88 | src/daft-functions/src/numeric/exp.rs:90-101 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-functions/src/numeric/cbrt.rs:20— src/daft-functions/src/numeric/cbrt.rs:20-31 | src/daft-functions/src/numeric/sqrt.rs:23-35 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-functions-utf8/src/replace.rs:269— src/daft-functions-utf8/src/replace.rs:269-282 | src/daft-functions-utf8/src/replace.rs:288-299 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-micropartition/src/python.rs:638— src/daft-micropartition/src/python.rs:638-649 | src/daft-recordbatch/src/python.rs:396-407 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-catalog/src/python/wrappers.rs:272— src/daft-catalog/src/python/wrappers.rs:272-283 | src/daft-catalog/src/python/wrappers.rs:289-300 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-logical-plan/src/partitioning.rs:199— src/daft-logical-plan/src/partitioning.rs:199-210 | src/daft-logical-plan/src/partitioning.rs:370-381 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-micropartition/src/micropartition.rs:198— src/daft-micropartition/src/micropartition.rs:198-212 | src/daft-recordbatch/src/lib.rs:1918-1929 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-core/src/array/list_array.rs:150— src/daft-core/src/array/list_array.rs:150-171 | src/daft-core/src/datatypes/python.rs:174-185 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-core/src/array/growable/fixed_size_list_growable.rs:79— src/daft-core/src/array/growable/fixed_size_list_growable.rs:79-90 | src/daft-core/src/array/growable/struct_growable.rs:85-100 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-catalog/src/python/wrappers.rs:236— src/daft-catalog/src/python/wrappers.rs:236-247 | src/daft-catalog/src/python/wrappers.rs:249-266 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-distributed/src/pipeline_node/in_memory_source.rs:68— src/daft-distributed/src/pipeline_node/in_memory_source.rs:68-79 | src/daft-distributed/src/pipeline_node/scan_source.rs:150-162 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-ext-macros/src/types.rs:374— src/daft-ext-macros/src/types.rs:374-385 | src/daft-ext-macros/src/types.rs:391-402 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-local-execution/src/join/asof_join.rs:222— src/daft-local-execution/src/join/asof_join.rs:222-233 | src/daft-local-execution/src/join/asof_join.rs:241-254 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) daft/io/writer.py:169— daft/io/writer.py:169-180 | daft/io/writer.py:362-373 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-core/src/utils/stats.rs:18— src/daft-core/src/utils/stats.rs:18-29 | src/daft-core/src/utils/stats.rs:89-101 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-decoding/src/deserialize.rs:227— src/daft-decoding/src/deserialize.rs:227-238 | src/daft-decoding/src/deserialize.rs:244-255 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-core/src/array/iterator.rs:217— src/daft-core/src/array/iterator.rs:217-228 | src/daft-core/src/array/iterator.rs:238-249 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/daft-local-execution/src/intermediate_ops/unpivot.rs:55— src/daft-local-execution/src/intermediate_ops/unpivot.rs:55-71 | src/daft-local-execution/src/intermediate_ops/filter.rs:126-137 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) daft/ai/google/provider.py:26— daft/ai/google/provider.py:26-37 | daft/ai/openai/provider.py:27-38 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×18
Edited copy of a member (9 corresponding lines) src/daft-local-execution/src/run.rs:635— src/daft-local-execution/src/run.rs:635-643 | src/daft-local-execution/src/run.rs:649-667 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-local-execution/src/runtime_stats/progress_bar.rs:250— src/daft-local-execution/src/runtime_stats/progress_bar.rs:250-258 | src/daft-runners/src/runners.rs:198-206 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-distributed/src/scheduling/scheduler/default.rs:48— src/daft-distributed/src/scheduling/scheduler/default.rs:48-56 | src/daft-distributed/src/scheduling/scheduler/linear.rs:28-36 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-functions-list/src/list_filter.rs:63— src/daft-functions-list/src/list_filter.rs:63-81 | src/daft-functions-utf8/src/regexp_count.rs:43-51 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-catalog/src/python/wrappers.rs:68— src/daft-catalog/src/python/wrappers.rs:68-76 | src/daft-catalog/src/python/wrappers.rs:138-146 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-local-execution/src/streaming_sink/vllm.rs:56— src/daft-local-execution/src/streaming_sink/vllm.rs:56-68 | src/daft-local-execution/src/streaming_sink/vllm.rs:70-78 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) daft/execution/vllm.py:178— daft/execution/vllm.py:178-190 | daft/execution/vllm.py:193-201 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-ext/src/abi/arrow.rs:389— src/daft-ext/src/abi/arrow.rs:389-397 | src/daft-ext/src/abi/arrow.rs:457-465 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/common/metrics/src/snapshot.rs:50— src/common/metrics/src/snapshot.rs:50-59 | src/common/metrics/src/snapshot.rs:99-107 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-ext/src/aggregate.rs:131— src/daft-ext/src/aggregate.rs:131-139 | src/daft-ext/src/aggregate.rs:149-158 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-core/src/datatypes/infer_datatype.rs:497— src/daft-core/src/datatypes/infer_datatype.rs:497-505 | src/daft-core/src/datatypes/infer_datatype.rs:511-519 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-dsl/src/visitor.rs:251— src/daft-dsl/src/visitor.rs:251-260 | src/daft-dsl/src/visitor.rs:277-285 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) benchmarking/ai/audio_transcription/ray_data_main.py:54— benchmarking/ai/audio_transcription/ray_data_main.py:54-63 | benchmarking/ai/audio_transcription/daft_main.py:55-63 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-dsl/src/functions/scalar.rs:292— src/daft-dsl/src/functions/scalar.rs:292-303 | src/daft-dsl/src/functions/mod.rs:118-126 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) daft/ai/lm_studio/provider.py:48— daft/ai/lm_studio/provider.py:48-58 | daft/ai/openai/provider.py:47-55 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-local-execution/src/sinks/gather.rs:80— src/daft-local-execution/src/sinks/gather.rs:80-91 | src/daft-local-execution/src/sinks/into_partitions.rs:157-165 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-local-execution/src/sinks/dedup.rs:68— src/daft-local-execution/src/sinks/dedup.rs:68-76 | src/daft-local-execution/src/sinks/window_base.rs:52-60 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/daft-io/src/gravitino.rs:20— src/daft-io/src/gravitino.rs:20-28 | src/daft-io/src/unity.rs:20-28 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×18
Edited copy of a member (7 corresponding lines) src/daft-functions-list/src/bool_and.rs:35— src/daft-functions-list/src/bool_and.rs:35-41 | src/daft-functions-list/src/bool_or.rs:33-39 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) benchmarking/ai/image_classification/daft_main.py:50— benchmarking/ai/image_classification/daft_main.py:50-57 | benchmarking/ai/image_classification/ray_data_main.py:32-38 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-core/src/series/ops/arithmetic.rs:86— src/daft-core/src/series/ops/arithmetic.rs:86-92 | src/daft-core/src/series/ops/logical.rs:68-74 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-functions/src/float/is_inf.rs:22— src/daft-functions/src/float/is_inf.rs:22-29 | src/daft-functions/src/float/not_nan.rs:25-31 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-local-execution/src/intermediate_ops/project.rs:36— src/daft-local-execution/src/intermediate_ops/project.rs:36-43 | src/daft-parquet/src/helpers.rs:119-125 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-dsl/src/expr/mod.rs:2752— src/daft-dsl/src/expr/mod.rs:2752-2758 | src/daft-recordbatch/src/lib.rs:1613-1619 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-ext-internal/src/aggregate.rs:314— src/daft-ext-internal/src/aggregate.rs:314-320 | src/daft-ext-internal/src/function.rs:221-227 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) daft/io/paimon/_predicate_visitor.py:126— daft/io/paimon/_predicate_visitor.py:126-133 | daft/io/paimon/_predicate_visitor.py:136-142 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/common/io-config/src/python.rs:532— src/common/io-config/src/python.rs:532-538 | src/daft-catalog/src/python/mod.rs:199-205 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-recordbatch/src/ops/window_states/first_last_value.rs:65— src/daft-recordbatch/src/ops/window_states/first_last_value.rs:65-71 | src/daft-recordbatch/src/ops/window_states/minmax.rs:98-107 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-distributed/src/pipeline_node/mod.rs:471— src/daft-distributed/src/pipeline_node/mod.rs:471-477 | src/daft-local-execution/src/pipeline.rs:378-384 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/common/daft-config/src/lib.rs:8— src/common/daft-config/src/lib.rs:8-14 | src/daft-local-execution/src/runtime_stats/mod.rs:54-60 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs:133— src/daft-core/src/array/fixed_size_list_array.rs:133-139 | src/daft-core/src/array/list_array.rs:141-148 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-distributed/src/pipeline_node/into_partitions.rs:305— src/daft-distributed/src/pipeline_node/into_partitions.rs:305-311 | src/daft-distributed/src/pipeline_node/random_shuffle.rs:148-157 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-local-execution/src/run.rs:773— src/daft-local-execution/src/run.rs:773-779 | src/daft-local-execution/src/runtime_stats/mod.rs:595-601 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-local-execution/src/intermediate_ops/udf.rs:564— src/daft-local-execution/src/intermediate_ops/udf.rs:564-570 | src/daft-local-execution/src/streaming_sink/vllm.rs:458-464 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-micropartition/src/python.rs:143— src/daft-micropartition/src/python.rs:143-149 | src/daft-recordbatch/src/python.rs:577-583 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/daft-local-execution/src/sinks/aggregate.rs:25— src/daft-local-execution/src/sinks/aggregate.rs:25-31 | src/daft-local-execution/src/sinks/pivot.rs:24-30 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) src/daft-csv/src/metadata.rs:252— src/daft-csv/src/metadata.rs:252-264 | src/daft-csv/src/metadata.rs:276-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/metadata.rs:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-csv/src/read.rs:209— src/daft-csv/src/read.rs:209-221 | src/daft-parquet/src/read.rs:194-206 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-parquet/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-ext-macros/src/lib.rs:125— src/daft-ext-macros/src/lib.rs:125-137 | src/daft-ext-macros/src/lib.rs:301-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext-macros/src/lib.rs:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-ext-macros/src/lib.rs:123` calls `Some`, `parse` and `src/daft-ext-macros/src/lib.rs:301` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) src/daft-functions-utf8/src/regexp_extract_all.rs:95— src/daft-functions-utf8/src/regexp_extract_all.rs:95-107 | src/daft-functions-utf8/src/split.rs:111-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) src/daft-functions-utf8/src/split_part.rs:102— src/daft-functions-utf8/src/split_part.rs:102-114 | src/daft-functions-utf8/src/substring_index.rs:100-112 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/split_part.rs:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-io/src/azure_blob.rs:857— src/daft-io/src/azure_blob.rs:857-869 | src/daft-io/src/azure_blob.rs:906-918 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/daft-io/src/object_store_glob.rs:448— src/daft-io/src/object_store_glob.rs:448-460 | src/daft-io/src/object_store_glob.rs:584-596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/object_store_glob.rs:448` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-local-execution/src/join/probe.rs:237— src/daft-local-execution/src/join/probe.rs:237-249 | src/daft-local-execution/src/join/probe.rs:288-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/probe.rs:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-local-execution/src/sources/scan_task.rs:404— src/daft-local-execution/src/sources/scan_task.rs:404-416 | src/daft-micropartition/src/micropartition.rs:493-505 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) src/daft-logical-plan/src/builder/mod.rs:1035— src/daft-logical-plan/src/builder/mod.rs:1035-1047 | src/daft-logical-plan/src/builder/mod.rs:1109-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:213— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:213-225 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:241-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:240` calls `clone` and `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:212` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) src/daft-parquet/src/reader/rg_processor.rs:127— src/daft-parquet/src/reader/rg_processor.rs:127-139 | src/daft-parquet/src/reader/rg_processor.rs:229-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-parquet/src/reader/rg_processor.rs:127` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) src/daft-scan/src/expr_rewriter.rs:182— src/daft-scan/src/expr_rewriter.rs:182-194 | src/daft-scan/src/expr_rewriter.rs:220-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/expr_rewriter.rs:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-distributed/src/scheduling/scheduler/default.rs:65— src/daft-distributed/src/scheduling/scheduler/default.rs:65-77 | src/daft-distributed/src/scheduling/scheduler/linear.rs:43-55 — before extracting anything, compare `src/daft-distributed/src/scheduling/scheduler/default.rs` and `src/daft-distributed/src/scheduling/scheduler/linear.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/scheduling/scheduler/default.rs:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/daft-functions/src/numeric/hypot.rs:42— src/daft-functions/src/numeric/hypot.rs:42-54 | src/daft-functions/src/numeric/trigonometry.rs:166-178 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/numeric/hypot.rs:42` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) daft/ai/google/protocols/prompter.py:162— daft/ai/google/protocols/prompter.py:162-174 | daft/ai/openai/protocols/prompter.py:248-260 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) daft/catalog/__postgres.py:608— daft/catalog/__postgres.py:608-620 | daft/catalog/__postgres.py:640-652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×16
Edited copy of a member (16 corresponding lines) src/daft-core/src/array/ops/comparison.rs:388— src/daft-core/src/array/ops/comparison.rs:388-406 | src/daft-core/src/array/ops/comparison.rs:496-511 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-core/src/datatypes/agg_ops.rs:6— src/daft-core/src/datatypes/agg_ops.rs:6-21 | src/daft-core/src/datatypes/agg_ops.rs:24-39 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-core/src/array/ops/full.rs:175— src/daft-core/src/array/ops/full.rs:175-197 | src/daft-core/src/array/ops/full.rs:199-214 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:98— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:98-113 | src/daft-distributed/src/pipeline_node/join/stats.rs:71-90 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-local-execution/src/intermediate_ops/udf.rs:77— src/daft-local-execution/src/intermediate_ops/udf.rs:77-97 | src/daft-local-execution/src/streaming_sink/async_udf.rs:74-89 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) daft/io/writer.py:376— daft/io/writer.py:376-394 | daft/io/writer.py:443-458 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-functions-temporal/src/date_arithmetic.rs:66— src/daft-functions-temporal/src/date_arithmetic.rs:66-81 | src/daft-functions-temporal/src/date_arithmetic.rs:118-133 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-local-execution/src/intermediate_ops/filter.rs:60— src/daft-local-execution/src/intermediate_ops/filter.rs:60-75 | src/daft-local-execution/src/sinks/write.rs:83-98 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-functions-uri/src/upload.rs:333— src/daft-functions-uri/src/upload.rs:333-349 | src/daft-functions-uri/src/upload.rs:355-370 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-micropartition/src/python.rs:714— src/daft-micropartition/src/python.rs:714-730 | src/daft-micropartition/src/python.rs:749-764 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-recordbatch/src/ops/window_states/count.rs:30— src/daft-recordbatch/src/ops/window_states/count.rs:30-45 | src/daft-recordbatch/src/ops/window_states/count.rs:47-62 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-distributed/src/python/mod.rs:127— src/daft-distributed/src/python/mod.rs:127-142 | src/daft-distributed/src/python/mod.rs:173-198 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-context/src/subscribers/dashboard.rs:342— src/daft-context/src/subscribers/dashboard.rs:342-359 | src/daft-context/src/subscribers/dashboard.rs:365-380 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-logical-plan/src/ops/asof_join.rs:101— src/daft-logical-plan/src/ops/asof_join.rs:101-119 | src/daft-logical-plan/src/ops/join.rs:204-219 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/common/io-config/src/tos.rs:44— src/common/io-config/src/tos.rs:44-61 | src/common/io-config/src/cos.rs:56-71 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/daft-local-execution/src/sources/scan_task.rs:54— src/daft-local-execution/src/sources/scan_task.rs:54-69 | src/daft-local-execution/src/sources/shuffle_read.rs:43-58 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) src/daft-dsl/src/python_udf/batch.rs:97— src/daft-dsl/src/python_udf/batch.rs:97-110 | src/daft-dsl/src/python_udf/row_wise.rs:93-106 — before extracting anything, compare `src/daft-dsl/src/python_udf/batch.rs` and `src/daft-dsl/src/python_udf/row_wise.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udf/batch.rs:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-dsl/src/python_udf/row_wise.rs:109` calls `clone` and `src/daft-dsl/src/python_udf/batch.rs:112` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) src/daft-dsl/src/python_udf/row_wise.rs:130— src/daft-dsl/src/python_udf/row_wise.rs:130-143 | src/daft-dsl/src/python_udf/row_wise.rs:165-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/daft-functions-list/src/kernels.rs:278— src/daft-functions-list/src/kernels.rs:278-291 | src/daft-functions-list/src/kernels.rs:338-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:278` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-functions-list/src/kernels.rs:1226— src/daft-functions-list/src/kernels.rs:1226-1239 | src/daft-functions-list/src/kernels.rs:1260-1273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:1226` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-functions-temporal/src/date_arithmetic.rs:68— src/daft-functions-temporal/src/date_arithmetic.rs:68-81 | src/daft-functions-temporal/src/date_arithmetic.rs:120-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_arithmetic.rs:68` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-functions/src/numeric/log.rs:40— src/daft-functions/src/numeric/log.rs:40-53 | src/daft-functions/src/numeric/log.rs:109-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/numeric/log.rs:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-local-execution/src/intermediate_ops/udf.rs:475— src/daft-local-execution/src/intermediate_ops/udf.rs:475-488 | src/daft-local-execution/src/streaming_sink/async_udf.rs:317-330 — before extracting anything, compare `src/daft-local-execution/src/intermediate_ops/udf.rs` and `src/daft-local-execution/src/streaming_sink/async_udf.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:187— src/daft-local-execution/src/join/left_right_join.rs:187-200 | src/daft-local-execution/src/join/outer_join.rs:186-199 — before extracting anything, compare `src/daft-local-execution/src/join/left_right_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/daft-recordbatch/src/ops/joins/hash_join.rs:38— src/daft-recordbatch/src/ops/joins/hash_join.rs:38-51 | src/daft-recordbatch/src/ops/joins/hash_join.rs:331-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/joins/hash_join.rs:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-recordbatch/src/ops/joins/hash_join.rs:102— src/daft-recordbatch/src/ops/joins/hash_join.rs:102-115 | src/daft-recordbatch/src/ops/joins/hash_join.rs:221-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/joins/hash_join.rs:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/common/image/src/image.rs:272— src/common/image/src/image.rs:272-285 | src/common/image/src/image.rs:290-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/image/src/image.rs:272` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-functions-utf8/src/split_part.rs:136— src/daft-functions-utf8/src/split_part.rs:136-149 | src/daft-functions-utf8/src/substring_index.rs:133-146 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/split_part.rs:136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) src/daft-sql/src/modules/temporal.rs:98— src/daft-sql/src/modules/temporal.rs:98-112 | src/daft-sql/src/modules/temporal.rs:169-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/temporal.rs:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/daft-scan/src/glob.rs:275— src/daft-scan/src/glob.rs:275-288 | src/daft-scan/src/glob.rs:377-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/glob.rs:275` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) src/daft-core/src/python/series.rs:284— src/daft-core/src/python/series.rs:284-297 | src/daft-recordbatch/src/python.rs:451-464 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/python/series.rs:284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
daft_core::array::ops::if_else::generic_if_else (cognitive 39) src/daft-core/src/array/ops/if_else.rs:17— daft_core::array::ops::if_else::generic_if_else has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (10 pts), match/switch 3 (7 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::search_sorted::search_sorted_boolean_array (cognitive 31) src/daft-core/src/kernels/search_sorted.rs:142— daft_core::kernels::search_sorted::search_sorted_boolean_array has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 3 (7 pts), loops 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::hashing::hash_boolean_inner (cognitive 30) src/daft-core/src/kernels/hashing.rs:512— daft_core::kernels::hashing::hash_boolean_inner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (10 pts), match/switch 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::search_sorted::search_sorted_primitive_array (cognitive 30) src/daft-core/src/kernels/search_sorted.rs:16— daft_core::kernels::search_sorted::search_sorted_primitive_array has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::hashing::hash_decimal_inner (cognitive 29) src/daft-core/src/kernels/hashing.rs:697— daft_core::kernels::hashing::hash_decimal_inner has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 4 (10 pts), match/switch 2 (4 pts) (nesting depth added 10). Of this number, 20 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
daft_core::series::from_lit::series_from_literals_iter (cognitive 24) src/daft-core/src/series/from_lit.rs:94— daft_core::series::from_lit::series_from_literals_iter has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 9 (14 pts), if/else 8 (10 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_core::array::ops::comparison::compare_struct_value (cognitive 20) src/daft-core/src/array/ops/comparison.rs:418— daft_core::array::ops::comparison::compare_struct_value has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (5 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::cmp::build_nan_aware_comparator (cognitive 20) src/daft-core/src/kernels/cmp.rs:22— daft_core::kernels::cmp::build_nan_aware_comparator has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::hashing::hash_primitive_inner (cognitive 20) src/daft-core/src/kernels/hashing.rs:462— daft_core::kernels::hashing::hash_primitive_inner has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (6 pts), match/switch 2 (4 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (daft_core::kernels::hashing::hash_timestamp_with_timezone_inner) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
daft_core::kernels::hashing::hash_timestamp_with_timezone_inner (cognitive 20) src/daft-core/src/kernels/hashing.rs:628— daft_core::kernels::hashing::hash_timestamp_with_timezone_inner has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (6 pts), match/switch 2 (4 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (daft_core::kernels::hashing::hash_primitive_inner) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
daft_core::kernels::search_sorted::search_sorted_multi_array (cognitive 20) src/daft-core/src/kernels/search_sorted.rs:237— daft_core::kernels::search_sorted::search_sorted_multi_array has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 6 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::kernels::search_sorted::search_sorted_generic (cognitive 18) src/daft-core/src/kernels/search_sorted.rs:88— daft_core::kernels::search_sorted::search_sorted_generic has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_core::array::ops::hash::hash_list (cognitive 17) src/daft-core/src/array/ops/hash.rs:350— daft_core::array::ops::hash::hash_list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×13
Edited copy of a member (14 corresponding lines) src/daft-distributed/src/pipeline_node/sort.rs:661— src/daft-distributed/src/pipeline_node/sort.rs:661-681 | src/daft-distributed/src/pipeline_node/top_n.rs:82-105 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-ext/src/aggregate.rs:108— src/daft-ext/src/aggregate.rs:108-121 | src/daft-ext/src/function.rs:76-90 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-distributed/src/pipeline_node/unpivot.rs:80— src/daft-distributed/src/pipeline_node/unpivot.rs:80-94 | src/daft-local-execution/src/intermediate_ops/unpivot.rs:73-86 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-logical-plan/src/lib.rs:45— src/daft-logical-plan/src/lib.rs:45-61 | src/daft-scan/src/python.rs:1324-1337 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-distributed/src/pipeline_node/explode.rs:79— src/daft-distributed/src/pipeline_node/explode.rs:79-92 | src/daft-distributed/src/pipeline_node/filter.rs:79-92 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-ext-internal/src/module.rs:124— src/daft-ext-internal/src/module.rs:124-137 | src/daft-ext-internal/src/module.rs:167-180 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-cli/src/dashboard.rs:272— src/daft-cli/src/dashboard.rs:272-285 | src/daft-cli/src/dashboard.rs:289-302 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-distributed/src/pipeline_node/filter.rs:162— src/daft-distributed/src/pipeline_node/filter.rs:162-175 | src/daft-distributed/src/pipeline_node/stage_checkpoint_keys.rs:156-169 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-core/src/array/ops/full.rs:80— src/daft-core/src/array/ops/full.rs:80-93 | src/daft-core/src/array/ops/full.rs:111-129 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-context/src/subscribers/debug.rs:86— src/daft-context/src/subscribers/debug.rs:86-108 | src/daft-context/src/subscribers/debug.rs:110-123 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/daft-context/src/subscribers/debug.rs:166— src/daft-context/src/subscribers/debug.rs:166-179 | src/daft-context/src/subscribers/debug.rs:181-194 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) daft/runners/native_runner.py:201— daft/runners/native_runner.py:201-214 | daft/runners/ray_runner.py:728-741 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) daft/io/_sql.py:378— daft/io/_sql.py:378-391 | daft/io/clickhouse/clickhouse_data_sink.py:78-94 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×12
Edited copy of a member (20 corresponding lines) src/daft-dsl/src/python_udf/batch.rs:129— src/daft-dsl/src/python_udf/batch.rs:129-181 | src/daft-dsl/src/python_udf/batch.rs:197-224 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-functions/src/numeric/sign.rs:23— src/daft-functions/src/numeric/sign.rs:23-42 | src/daft-functions/src/numeric/sign.rs:75-115 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:289— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:289-318 | src/daft-distributed/src/pipeline_node/join/hash_join.rs:102-121 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-functions-binary/src/encode.rs:54— src/daft-functions-binary/src/encode.rs:54-73 | src/daft-functions-binary/src/encode.rs:108-127 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-groupby/src/arrays.rs:43— src/daft-groupby/src/arrays.rs:43-70 | src/daft-groupby/src/arrays.rs:93-112 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) daft/catalog/__gravitino/_catalog.py:102— daft/catalog/__gravitino/_catalog.py:102-121 | daft/catalog/__unity/_catalog.py:91-112 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-logical-plan/src/optimization/rules/drop_into_batches.rs:23— src/daft-logical-plan/src/optimization/rules/drop_into_batches.rs:23-42 | src/daft-logical-plan/src/optimization/rules/drop_repartition.rs:23-42 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-core/src/series/ops/agg.rs:303— src/daft-core/src/series/ops/agg.rs:303-322 | src/daft-core/src/series/ops/agg.rs:324-343 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-functions-list/src/kernels.rs:1048— src/daft-functions-list/src/kernels.rs:1048-1067 | src/daft-functions-list/src/kernels.rs:1075-1094 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-io/src/lib.rs:463— src/daft-io/src/lib.rs:463-486 | src/daft-io/src/lib.rs:494-513 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-local-execution/src/sinks/grouped_aggregate.rs:432— src/daft-local-execution/src/sinks/grouped_aggregate.rs:432-451 | src/daft-local-execution/src/sinks/window_partition_only.rs:177-196 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/daft-dsl/src/python_udf/batch.rs:44— src/daft-dsl/src/python_udf/batch.rs:44-64 | src/daft-dsl/src/python_udf/row_wise.rs:42-61 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×11
Edited copy of a member (17 corresponding lines) src/daft-algebra/src/simplify/numeric.rs:48— src/daft-algebra/src/simplify/numeric.rs:48-67 | src/daft-algebra/src/simplify/numeric.rs:69-85 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-file/src/functions.rs:506— src/daft-file/src/functions.rs:506-526 | src/daft-file/src/functions.rs:550-566 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-catalog/src/python/wrappers.rs:87— src/daft-catalog/src/python/wrappers.rs:87-104 | src/daft-catalog/src/python/wrappers.rs:157-173 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-schema/src/schema.rs:196— src/daft-schema/src/schema.rs:196-212 | src/daft-schema/src/schema.rs:215-239 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-core/src/series/ops/arithmetic.rs:398— src/daft-core/src/series/ops/arithmetic.rs:398-431 | src/daft-core/src/series/ops/arithmetic.rs:436-452 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/common/runtime/src/lib.rs:190— src/common/runtime/src/lib.rs:190-206 | src/common/runtime/src/lib.rs:208-227 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-logical-plan/src/ops/distinct.rs:43— src/daft-logical-plan/src/ops/distinct.rs:43-63 | src/daft-logical-plan/src/ops/explode.rs:87-103 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-schema/src/schema.rs:129— src/daft-schema/src/schema.rs:129-145 | src/daft-schema/src/schema.rs:153-169 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-algebra/src/boolean.rs:11— src/daft-algebra/src/boolean.rs:11-27 | src/daft-algebra/src/boolean.rs:29-45 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) daft/io/writer.py:296— daft/io/writer.py:296-312 | daft/io/writer.py:424-440 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/daft-logical-plan/src/builder/mod.rs:927— src/daft-logical-plan/src/builder/mod.rs:927-944 | src/daft-logical-plan/src/builder/mod.rs:994-1010 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×11
Edited copy of a member (15 corresponding lines) src/daft-functions/src/numeric/hypot.rs:40— src/daft-functions/src/numeric/hypot.rs:40-54 | src/daft-functions/src/numeric/trigonometry.rs:163-178 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-checkpoint/src/config.rs:41— src/daft-checkpoint/src/config.rs:41-55 | src/daft-checkpoint/src/config.rs:58-72 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-parquet/src/statistics/column_range.rs:37— src/daft-parquet/src/statistics/column_range.rs:37-51 | src/daft-parquet/src/statistics/column_range.rs:58-75 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-functions/src/distance/cosine.rs:8— src/daft-functions/src/distance/cosine.rs:8-22 | src/daft-functions/src/similarity/cosine.rs:8-27 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-recordbatch/src/ops/window_states/first_last_value.rs:49— src/daft-recordbatch/src/ops/window_states/first_last_value.rs:49-63 | src/daft-recordbatch/src/ops/window_states/first_last_value.rs:118-132 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-image/src/series.rs:186— src/daft-image/src/series.rs:186-200 | src/daft-image/src/series.rs:234-248 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-dsl/src/treenode.rs:10— src/daft-dsl/src/treenode.rs:10-24 | src/daft-local-plan/src/plan.rs:1956-1970 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-distributed/src/pipeline_node/distinct.rs:86— src/daft-distributed/src/pipeline_node/distinct.rs:86-100 | src/daft-distributed/src/pipeline_node/top_n.rs:110-127 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs:141— src/daft-core/src/array/fixed_size_list_array.rs:141-155 | src/daft-core/src/array/struct_array.rs:190-206 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-local-execution/src/intermediate_ops/udf.rs:61— src/daft-local-execution/src/intermediate_ops/udf.rs:61-75 | src/daft-local-execution/src/streaming_sink/async_udf.rs:58-72 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/daft-context/src/subscribers/debug.rs:125— src/daft-context/src/subscribers/debug.rs:125-140 | src/daft-context/src/subscribers/debug.rs:142-156 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×11
Edited copy of a member (13 corresponding lines) src/daft-image/src/ops.rs:462— src/daft-image/src/ops.rs:462-474 | src/daft-image/src/ops.rs:478-490 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-core/src/array/ops/full.rs:144— src/daft-core/src/array/ops/full.rs:144-157 | src/daft-core/src/array/ops/full.rs:159-171 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-io/src/huggingface/mod.rs:422— src/daft-io/src/huggingface/mod.rs:422-434 | src/daft-io/src/huggingface/mod.rs:445-464 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-ext-internal/src/aggregate.rs:59— src/daft-ext-internal/src/aggregate.rs:59-71 | src/daft-ext-internal/src/function.rs:74-89 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) daft/runners/native_runner.py:54— daft/runners/native_runner.py:54-66 | daft/runners/ray_runner.py:136-148 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-local-execution/src/sinks/dedup.rs:54— src/daft-local-execution/src/sinks/dedup.rs:54-66 | src/daft-local-execution/src/sinks/grouped_aggregate.rs:54-66 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) daft/io/source.py:150— daft/io/source.py:150-205 | daft/io/source.py:219-231 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-functions-list/src/append.rs:26— src/daft-functions-list/src/append.rs:26-38 | src/daft-functions-list/src/contains.rs:28-44 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-local-execution/src/sinks/gather.rs:177— src/daft-local-execution/src/sinks/gather.rs:177-189 | src/daft-local-execution/src/sinks/into_partitions.rs:275-289 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/daft-local-execution/src/intermediate_ops/explode.rs:136— src/daft-local-execution/src/intermediate_ops/explode.rs:136-148 | src/daft-local-execution/src/intermediate_ops/project.rs:156-177 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) daft/functions/misc.py:125— daft/functions/misc.py:125-137 | daft/functions/numeric.py:247-284 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×11
Edited copy of a member (11 corresponding lines) src/daft-dsl/src/expr/mod.rs:2503— src/daft-dsl/src/expr/mod.rs:2503-2513 | src/daft-dsl/src/expr/mod.rs:2516-2526 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) daft/catalog/__paimon.py:178— daft/catalog/__paimon.py:178-188 | daft/catalog/__paimon.py:192-207 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-local-execution/src/intermediate_ops/stage_checkpoint_keys.rs:60— src/daft-local-execution/src/intermediate_ops/stage_checkpoint_keys.rs:60-70 | src/daft-local-execution/src/join/stats.rs:91-102 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-local-execution/src/join/asof_join.rs:548— src/daft-local-execution/src/join/asof_join.rs:548-558 | src/daft-local-execution/src/join/asof_join.rs:560-570 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-logical-plan/src/ops/shard.rs:44— src/daft-logical-plan/src/ops/shard.rs:44-54 | src/daft-logical-plan/src/ops/unpivot.rs:107-117 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-writers/src/file.rs:168— src/daft-writers/src/file.rs:168-178 | src/daft-writers/src/file.rs:234-245 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-core/src/datatypes/agg_ops.rs:72— src/daft-core/src/datatypes/agg_ops.rs:72-82 | src/daft-core/src/datatypes/agg_ops.rs:85-95 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-distributed/src/pipeline_node/into_partitions.rs:316— src/daft-distributed/src/pipeline_node/into_partitions.rs:316-329 | src/daft-distributed/src/pipeline_node/sort.rs:686-696 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) daft/ai/transformers/provider.py:60— daft/ai/transformers/provider.py:60-70 | daft/ai/transformers/provider.py:110-124 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-functions-utf8/src/utils.rs:184— src/daft-functions-utf8/src/utils.rs:184-195 | src/daft-functions-utf8/src/utils.rs:199-209 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/daft-csv/src/metadata.rs:59— src/daft-csv/src/metadata.rs:59-69 | src/daft-json/src/schema.rs:59-70 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) src/daft-algebra/src/simplify/boolean.rs:93— src/daft-algebra/src/simplify/boolean.rs:93-107 | src/daft-algebra/src/simplify/boolean.rs:187-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-algebra/src/simplify/boolean.rs:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/daft-core/src/array/struct_array.rs:37— src/daft-core/src/array/struct_array.rs:37-51 | src/daft-core/src/array/union_array.rs:40-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/struct_array.rs:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/daft-distributed/src/pipeline_node/join/cross_join.rs:85— src/daft-distributed/src/pipeline_node/join/cross_join.rs:85-99 | src/daft-distributed/src/pipeline_node/join/cross_join.rs:106-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/join/cross_join.rs:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) src/daft-functions-list/src/kernels.rs:499— src/daft-functions-list/src/kernels.rs:499-513 | src/daft-functions-list/src/kernels.rs:910-924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:499` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) src/daft-functions-temporal/src/date_arithmetic.rs:177— src/daft-functions-temporal/src/date_arithmetic.rs:177-191 | src/daft-functions-temporal/src/date_arithmetic.rs:393-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_arithmetic.rs:177` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) src/daft-local-execution/src/join/inner_join.rs:31— src/daft-local-execution/src/join/inner_join.rs:31-45 | src/daft-local-execution/src/join/left_right_join.rs:41-55 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/left_right_join.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/inner_join.rs:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-local-execution/src/join/left_right_join.rs:40` calls `mark_used` and `src/daft-local-execution/src/join/inner_join.rs:30` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:572— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:572-586 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:638-652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:572` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/daft-logical-plan/src/optimization/rules/split_udfs.rs:249— src/daft-logical-plan/src/optimization/rules/split_udfs.rs:249-263 | src/daft-logical-plan/src/optimization/rules/split_udfs.rs:315-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/split_udfs.rs:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:470— src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:470-484 | src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:496-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:470` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) src/daft-logical-plan/src/ops/window.rs:176— src/daft-logical-plan/src/ops/window.rs:176-190 | src/daft-logical-plan/src/ops/window.rs:193-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) src/daft-csv/src/read.rs:59— src/daft-csv/src/read.rs:59-73 | src/daft-json/src/read.rs:57-71 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AXH1 · Runtime security headers· Runtime security header not set · ×10
Runtime security header not set: content-security-policy — The live app's responses did not include content-security-policy (restricts the sources a page may load — mitigates XSS/injection). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-embedder-policy — The live app's responses did not include cross-origin-embedder-policy (recommended by the OWASP Secure Headers Project (value: require-corp)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-opener-policy — The live app's responses did not include cross-origin-opener-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-resource-policy — The live app's responses did not include cross-origin-resource-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: permissions-policy — The live app's responses did not include permissions-policy (restricts powerful browser features (camera, geolocation, …)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: referrer-policy — The live app's responses did not include referrer-policy (limits referrer leakage to third parties). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: strict-transport-security — The live app's responses did not include strict-transport-security (forces HTTPS on subsequent requests — mitigates downgrade/MITM). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-dns-prefetch-control — The live app's responses did not include x-dns-prefetch-control (recommended by the OWASP Secure Headers Project (value: off)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-frame-options — The live app's responses did not include x-frame-options (blocks clickjacking via framing (or use CSP frame-ancestors)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-permitted-cross-domain-policies — The live app's responses did not include x-permitted-cross-domain-policies (recommended by the OWASP Secure Headers Project (value: none)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
HackComment tests/io/test_s3_credentials_refresh.py:94— # hack because ray runner will not increment `count_get_credentials` — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/daft-sql/src/modules/aggs.rs:22— // HACK TO USE AggExpr as an enum rather than a — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/daft-scan/src/lib.rs:671— // HACK: This might not be a good idea? We could also just return None here — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/daft-scan/src/python.rs:966— // HACK: StorageConfig isn't used when running the Python function but this is a non-optional arg for — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/daft-functions-uri/src/upload.rs:127— // HACK: Creates folders if running locally. This is a bit of a hack to do it here because we'd rather delegate this to — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/common/image/src/cow_image.rs:175— // HACK(jay): The `.to_image()` method on SubImage takes in `'static` references for some reason — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment REDACTED:420— # Hack to circumvent non-predictable memoization caused by string interning. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment REDACTED:708— # Hack to circumvent non-predictable memoization caused by string interning. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment REDACTED:737— # Hack to circumvent non-predictable memoization caused by string interning. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment REDACTED:821— # Hack to circumvent non-predictable memoization caused by string interning. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×10
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-core/src/array/growable/fixed_size_list_growable.rs:25— src/daft-core/src/array/growable/fixed_size_list_growable.rs:25-54 | src/daft-core/src/array/growable/list_growable.rs:30-62 | src/daft-core/src/array/growable/python_growable.rs:28-45 | src/daft-core/src/array/growable/struct_growable.rs:24-61 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-distributed/src/pipeline_node/explode.rs:60— src/daft-distributed/src/pipeline_node/explode.rs:60-77 | src/daft-distributed/src/pipeline_node/filter.rs:60-77 | src/daft-distributed/src/pipeline_node/stage_checkpoint_keys.rs:95-110 | src/daft-distributed/src/pipeline_node/udf.rs:58-81 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-io/src/s3_like.rs:789— src/daft-io/src/s3_like.rs:789-887 | src/daft-io/src/s3_like.rs:895-960 | src/daft-io/src/s3_like.rs:974-1079 | src/daft-io/src/s3_like.rs:1131-1205 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-local-execution/src/sinks/sort.rs:111— src/daft-local-execution/src/sinks/sort.rs:111-131 | src/daft-local-execution/src/sinks/top_n.rs:155-186 | src/daft-logical-plan/src/ops/sort.rs:80-103 | src/daft-logical-plan/src/ops/top_n.rs:125-158 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-micropartition/src/python.rs:1026— src/daft-micropartition/src/python.rs:1026-1044 | src/daft-micropartition/src/python.rs:1057-1080 | src/daft-micropartition/src/python.rs:1090-1117 | src/daft-micropartition/src/python.rs:1127-1154 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-recordbatch/src/ops/joins/hash_join.rs:25— src/daft-recordbatch/src/ops/joins/hash_join.rs:25-115 | src/daft-recordbatch/src/ops/joins/hash_join.rs:124-234 | src/daft-recordbatch/src/ops/joins/hash_join.rs:243-305 | src/daft-recordbatch/src/ops/joins/hash_join.rs:313-446 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-sql/src/modules/config.rs:36— src/daft-sql/src/modules/config.rs:36-137 | src/daft-sql/src/modules/config.rs:178-221 | src/daft-sql/src/modules/config.rs:244-298 | src/daft-sql/src/modules/config.rs:369-433 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/daft-writers/src/pyarrow.rs:27— src/daft-writers/src/pyarrow.rs:27-76 | src/daft-writers/src/pyarrow.rs:84-124 | src/daft-writers/src/pyarrow.rs:134-167 | src/daft-writers/src/pyarrow.rs:176-208 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) daft/dataframe/dataframe.py:1028— daft/dataframe/dataframe.py:1028-1109 | daft/dataframe/dataframe.py:1125-1225 | daft/dataframe/dataframe.py:1238-1326 | daft/dataframe/dataframe.py:1338-1400 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) daft/recordbatch/micropartition.py:221— daft/recordbatch/micropartition.py:221-249 | daft/recordbatch/micropartition.py:428-456 | daft/recordbatch/recordbatch.py:264-290 | daft/recordbatch/recordbatch.py:441-469 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×10
Edited copy of a member (23 corresponding lines) src/daft-functions-list/src/kernels.rs:404— src/daft-functions-list/src/kernels.rs:404-427 | src/daft-functions-list/src/kernels.rs:781-803 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-functions-binary/src/decode.rs:57— src/daft-functions-binary/src/decode.rs:57-79 | src/daft-functions-binary/src/decode.rs:112-134 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-functions-utf8/src/regexp_extract.rs:29— src/daft-functions-utf8/src/regexp_extract.rs:29-51 | src/daft-functions-utf8/src/regexp_extract_all.rs:31-53 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs:79— src/daft-core/src/array/fixed_size_list_array.rs:79-101 | src/daft-core/src/array/list_array.rs:90-112 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-distributed/src/scheduling/scheduler/default.rs:121— src/daft-distributed/src/scheduling/scheduler/default.rs:121-143 | src/daft-distributed/src/scheduling/scheduler/linear.rs:99-138 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/common/io-config/src/python.rs:2033— src/common/io-config/src/python.rs:2033-2060 | src/common/io-config/src/python.rs:2318-2340 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-dsl/src/functions/partitioning/evaluators.rs:71— src/daft-dsl/src/functions/partitioning/evaluators.rs:71-99 | src/daft-dsl/src/functions/partitioning/evaluators.rs:124-146 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-ext-internal/src/aggregate.rs:261— src/daft-ext-internal/src/aggregate.rs:261-283 | src/daft-ext-internal/src/aggregate.rs:285-310 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/common/macros/src/function_args.rs:359— src/common/macros/src/function_args.rs:359-381 | src/common/macros/src/function_args.rs:383-405 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/daft-functions-utf8/src/hamming.rs:83— src/daft-functions-utf8/src/hamming.rs:83-105 | src/daft-functions-utf8/src/utils.rs:326-348 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×10
Edited copy of a member (4 corresponding lines) daft/expressions/expressions.py:411— daft/expressions/expressions.py:411-414 | daft/expressions/expressions.py:417-420 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) benchmarking/ai/image_classification/daft_main.py:40— benchmarking/ai/image_classification/daft_main.py:40-43 | benchmarking/ai/image_classification/ray_data_main.py:26-29 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/daft-core/src/python/series.rs:422— src/daft-core/src/python/series.rs:422-425 | src/daft-recordbatch/src/python.rs:444-447 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) daft/io/delta_lake/delta_lake_write.py:196— daft/io/delta_lake/delta_lake_write.py:196-199 | daft/io/iceberg/iceberg_write.py:257-260 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/daft-core/src/python/series.rs:277— src/daft-core/src/python/series.rs:277-280 | src/daft-recordbatch/src/python.rs:65-70 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/daft-local-execution/src/sinks/grouped_aggregate.rs:133— src/daft-local-execution/src/sinks/grouped_aggregate.rs:133-141 | src/daft-local-execution/src/sinks/window_base.rs:23-26 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/daft-io/src/gravitino.rs:228— src/daft-io/src/gravitino.rs:228-231 | src/daft-io/src/unity.rs:167-170 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/daft-io/src/gravitino.rs:233— src/daft-io/src/gravitino.rs:233-236 | src/daft-io/src/unity.rs:172-175 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) benchmarking/tpch/__main__.py:117— benchmarking/tpch/__main__.py:117-120 | benchmarking/tpch/ray_job_runner.py:78-81 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) daft/functions/bitwise.py:9— daft/functions/bitwise.py:9-12 | daft/functions/misc.py:308-337 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×9
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×9
Edited copy of a member (8 corresponding lines) src/daft-functions-utf8/src/lpad.rs:26— src/daft-functions-utf8/src/lpad.rs:26-33 | src/daft-functions-utf8/src/rpad.rs:26-33 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/common/runtime/src/joinset.rs:68— src/common/runtime/src/joinset.rs:68-75 | src/common/runtime/src/joinset.rs:86-93 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/daft-catalog/src/python/wrappers.rs:49— src/daft-catalog/src/python/wrappers.rs:49-57 | src/daft-catalog/src/python/wrappers.rs:175-182 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) daft/recordbatch/micropartition.py:385— daft/recordbatch/micropartition.py:385-392 | daft/recordbatch/recordbatch.py:402-409 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/daft-functions/src/distance/euclidean.rs:8— src/daft-functions/src/distance/euclidean.rs:8-18 | src/daft-functions/src/distance/dot_product.rs:8-15 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) daft/io/hudi/pyhudi/utils.py:89— daft/io/hudi/pyhudi/utils.py:89-96 | daft/io/hudi/pyhudi/utils.py:100-111 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/daft-core/src/array/union_array.rs:145— src/daft-core/src/array/union_array.rs:145-153 | src/daft-core/src/array/struct_array.rs:181-188 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/daft-core/src/series/mod.rs:152— src/daft-core/src/series/mod.rs:152-159 | src/daft-recordbatch/src/column/mod.rs:135-142 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/daft-csv/src/options.rs:113— src/daft-csv/src/options.rs:113-121 | src/daft-json/src/options.rs:82-89 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
daft_core::utils::supertype::get_supertype::inner (cyclomatic 125) src/daft-core/src/utils/supertype.rs:44— daft_core::utils::supertype::get_supertype::inner has cyclomatic complexity 125 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_core::series::from_lit::series_from_literals_iter (cyclomatic 54) src/daft-core/src/series/from_lit.rs:94— daft_core::series::from_lit::series_from_literals_iter has cyclomatic complexity 54 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_core::array::ops::comparison::compare_struct_value (cyclomatic 22) src/daft-core/src/array/ops/comparison.rs:418— daft_core::array::ops::comparison::compare_struct_value has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_core::array::ops::if_else::generic_if_else (cyclomatic 18) src/daft-core/src/array/ops/if_else.rs:17— daft_core::array::ops::if_else::generic_if_else has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_core::kernels::hashing::hash (cyclomatic 17) src/daft-core/src/kernels/hashing.rs:304— daft_core::kernels::hashing::hash has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_core::kernels::search_sorted::search_sorted_boolean_array (cyclomatic 17) src/daft-core/src/kernels/search_sorted.rs:142— daft_core::kernels::search_sorted::search_sorted_boolean_array has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_core::kernels::hashing::hash_decimal_inner (cyclomatic 16) src/daft-core/src/kernels/hashing.rs:697— daft_core::kernels::hashing::hash_decimal_inner has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_core::kernels::search_sorted::search_sorted_primitive_array (cyclomatic 16) src/daft-core/src/kernels/search_sorted.rs:16— daft_core::kernels::search_sorted::search_sorted_primitive_array has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SQLPlanner::plan_expr (cognitive 65) src/daft-sql/src/planner.rs:1645— SQLPlanner::plan_expr has cognitive complexity 65 (threshold 15). Drivers by points: if/else 20 (33 pts), match/switch 12 (27 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 30). Of this number, 53 points are the body's own statements and 12 belong to 2 function items inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SQLPlanner::plan_query (cognitive 43) src/daft-sql/src/planner.rs:398— SQLPlanner::plan_query has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 10 (21 pts), if/else 10 (18 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SQLPlanner::plan_aggregate_query (cognitive 24) src/daft-sql/src/planner.rs:673— SQLPlanner::plan_aggregate_query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SQLPlanner::select_item_to_expr (cognitive 22) src/daft-sql/src/planner.rs:1488— SQLPlanner::select_item_to_expr has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 3 (4 pts) (nesting depth added 8). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SQLPlanner::parse_window_spec (cognitive 19) src/daft-sql/src/functions.rs:561— SQLPlanner::parse_window_spec has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SQLPlanner::plan_order_by_exprs (cognitive 18) src/daft-sql/src/planner.rs:819— SQLPlanner::plan_order_by_exprs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SQLPlanner::convert_window_frame_bound (cognitive 17) src/daft-sql/src/functions.rs:622— SQLPlanner::convert_window_frame_bound has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SQLPlanner::plan_identifier (cognitive 17) src/daft-sql/src/planner.rs:1379— SQLPlanner::plan_identifier has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×8
Edited copy of a member (32 corresponding lines) src/daft-core/src/series/utils/python_fn.rs:27— src/daft-core/src/series/utils/python_fn.rs:27-67 | src/daft-core/src/series/utils/python_fn.rs:69-100 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/daft-dsl/src/python_udaf.rs:62— src/daft-dsl/src/python_udaf.rs:62-94 | src/daft-dsl/src/python_udaf.rs:96-127 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/daft-ext-macros/src/types.rs:295— src/daft-ext-macros/src/types.rs:295-326 | src/daft-ext-macros/src/types.rs:328-368 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/daft-sql/src/modules/window.rs:71— src/daft-sql/src/modules/window.rs:71-104 | src/daft-sql/src/modules/window.rs:120-151 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/common/io-config/src/gcs.rs:47— src/common/io-config/src/gcs.rs:47-84 | src/common/io-config/src/huggingface.rs:35-66 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/daft-parquet/src/python.rs:200— src/daft-parquet/src/python.rs:200-231 | src/daft-parquet/src/python.rs:256-290 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/daft-micropartition/src/python.rs:790— src/daft-micropartition/src/python.rs:790-821 | src/daft-micropartition/src/python.rs:851-882 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs:35— src/daft-core/src/array/fixed_size_list_array.rs:35-66 | src/daft-core/src/array/list_array.rs:38-73 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×8
Edited copy of a member (22 corresponding lines) src/daft-functions-utf8/src/split_part.rs:37— src/daft-functions-utf8/src/split_part.rs:37-58 | src/daft-functions-utf8/src/substring_index.rs:35-56 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/common/io-config/src/gravitino.rs:18— src/common/io-config/src/gravitino.rs:18-39 | src/daft-scan/src/pushdowns.rs:124-145 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/daft-functions-utf8/src/chr.rs:31— src/daft-functions-utf8/src/chr.rs:31-52 | src/daft-functions-utf8/src/space.rs:30-51 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/daft-local-execution/src/join/probe.rs:66— src/daft-local-execution/src/join/probe.rs:66-87 | src/daft-local-execution/src/streaming_sink/base.rs:156-178 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/daft-image/src/functions/decode.rs:75— src/daft-image/src/functions/decode.rs:75-96 | src/daft-image/src/functions/decode_image_file.rs:113-134 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) daft/session.py:352— daft/session.py:352-373 | daft/session.py:381-402 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/daft-core/src/array/ops/sort.rs:118— src/daft-core/src/array/ops/sort.rs:118-139 | src/daft-core/src/array/ops/sort.rs:147-169 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:62— src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:62-86 | src/daft-distributed/src/pipeline_node/limit.rs:102-123 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×8
Edited copy of a member (21 corresponding lines) daft/udf/execution.py:79— daft/udf/execution.py:79-99 | daft/udf/execution.py:108-128 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-micropartition/src/python.rs:339— src/daft-micropartition/src/python.rs:339-359 | src/daft-recordbatch/src/python.rs:118-138 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-context/src/subscribers/dashboard.rs:481— src/daft-context/src/subscribers/dashboard.rs:481-503 | src/daft-context/src/subscribers/dashboard.rs:505-525 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-dashboard/src/engine.rs:329— src/daft-dashboard/src/engine.rs:329-349 | src/daft-dashboard/src/engine.rs:363-383 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-micropartition/src/python.rs:590— src/daft-micropartition/src/python.rs:590-610 | src/daft-recordbatch/src/python.rs:348-368 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-dsl/src/functions/map/get.rs:14— src/daft-dsl/src/functions/map/get.rs:14-35 | src/daft-dsl/src/functions/map/map_keys.rs:14-34 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-recordbatch/src/ops/window_states/sum.rs:66— src/daft-recordbatch/src/ops/window_states/sum.rs:66-86 | src/daft-recordbatch/src/ops/window_states/sum.rs:88-108 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/daft-logical-plan/src/ops/project.rs:51— src/daft-logical-plan/src/ops/project.rs:51-71 | src/daft-logical-plan/src/ops/udf.rs:43-64 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (16 lines × 2) src/daft-avro/src/read.rs:130— src/daft-avro/src/read.rs:130-145 | src/daft-avro/src/read.rs:161-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-avro/src/read.rs:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/daft-core/src/array/growable/struct_growable.rs:27— src/daft-core/src/array/growable/struct_growable.rs:27-42 | src/daft-core/src/array/growable/union_growable.rs:32-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16 lines × 2) src/daft-io/src/s3_like.rs:1132— src/daft-io/src/s3_like.rs:1132-1147 | src/daft-io/src/s3_like.rs:1263-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/daft-logical-plan/src/ops/set_operations.rs:180— src/daft-logical-plan/src/ops/set_operations.rs:180-195 | src/daft-logical-plan/src/ops/set_operations.rs:487-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/set_operations.rs:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/daft-logical-plan/src/optimization/rules/split_udfs.rs:275— src/daft-logical-plan/src/optimization/rules/split_udfs.rs:275-290 | src/daft-logical-plan/src/optimization/rules/split_udfs.rs:346-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/split_udfs.rs:275` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-logical-plan/src/optimization/rules/split_udfs.rs:291` calls `Ok`, `no` and `src/daft-logical-plan/src/optimization/rules/split_udfs.rs:362` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) src/daft-io/src/gravitino.rs:115— src/daft-io/src/gravitino.rs:115-130 | src/daft-io/src/unity.rs:95-110 — before extracting anything, compare `src/daft-io/src/gravitino.rs` and `src/daft-io/src/unity.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/gravitino.rs:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/daft-core/src/series/ops/agg.rs:456— src/daft-core/src/series/ops/agg.rs:456-471 | src/daft-core/src/series/ops/agg.rs:482-497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/ops/agg.rs:456` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) daft/api_annotations.py:25— daft/api_annotations.py:25-40 | daft/api_annotations.py:44-59 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 3) src/daft-distributed/src/pipeline_node/udf.rs:44— src/daft-distributed/src/pipeline_node/udf.rs:44-50 | src/daft-local-execution/src/intermediate_ops/udf.rs:65-71 | src/daft-local-execution/src/streaming_sink/async_udf.rs:63-69 — before extracting anything, compare `src/daft-local-execution/src/intermediate_ops/udf.rs` and `src/daft-local-execution/src/streaming_sink/async_udf.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-distributed/src/pipeline_node/udf.rs:51` calls `clone` and `src/daft-local-execution/src/streaming_sink/async_udf.rs:70` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) src/daft-functions/src/numeric/log.rs:40— src/daft-functions/src/numeric/log.rs:40-46 | src/daft-functions/src/numeric/log.rs:109-115 | src/daft-functions/src/numeric/pow.rs:43-49 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/numeric/log.rs:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) src/daft-logical-plan/src/logical_plan.rs:454— src/daft-logical-plan/src/logical_plan.rs:454-460 | src/daft-logical-plan/src/logical_plan.rs:1054-1060 | src/daft-logical-plan/src/logical_plan.rs:1089-1095 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) src/daft-functions-utf8/src/chr.rs:59— src/daft-functions-utf8/src/chr.rs:59-65 | src/daft-functions-utf8/src/space.rs:58-64 | src/daft-functions-utf8/src/utils.rs:216-222 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/chr.rs:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) src/daft-distributed/src/statistics/task_lifecycle.rs:24— src/daft-distributed/src/statistics/task_lifecycle.rs:24-30 | src/daft-local-execution/src/run.rs:320-326 | src/daft-local-execution/src/runtime_stats/mod.rs:64-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (7 lines × 3) src/daft-functions-list/src/seq.rs:43— src/daft-functions-list/src/seq.rs:43-53 | src/daft-functions/src/numeric/bin.rs:37-43 | src/daft-functions/src/numeric/factorial.rs:37-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/seq.rs:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) src/daft-functions-temporal/src/time.rs:160— src/daft-functions-temporal/src/time.rs:160-169 | src/daft-functions-temporal/src/time.rs:244-250 | src/daft-functions-temporal/src/time.rs:325-331 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/time.rs:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-functions-temporal/src/time.rs:243` calls `parse_timezone` and `src/daft-functions-temporal/src/time.rs:159` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) src/daft-dsl/src/python_udaf.rs:63— src/daft-dsl/src/python_udaf.rs:63-69 | src/daft-dsl/src/python_udaf.rs:97-103 | src/daft-dsl/src/python_udaf.rs:130-136 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udaf.rs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/daft-core/src/array/ops/compare_agg.rs:115— src/daft-core/src/array/ops/compare_agg.rs:115-119 | src/daft-core/src/array/ops/compare_agg.rs:174-178 | src/daft-core/src/array/ops/compare_agg.rs:237-241 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/compare_agg.rs:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/daft-logical-plan/src/ops/project.rs:676— src/daft-logical-plan/src/ops/project.rs:676-680 | src/daft-logical-plan/src/ops/project.rs:690-694 | src/daft-logical-plan/src/ops/project.rs:704-708 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/project.rs:676` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/daft-micropartition/src/python.rs:1058— src/daft-micropartition/src/python.rs:1058-1062 | src/daft-micropartition/src/python.rs:1091-1095 | src/daft-micropartition/src/python.rs:1128-1132 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) src/daft-sql/src/table_provider/read_csv.rs:25— src/daft-sql/src/table_provider/read_csv.rs:25-29 | src/daft-sql/src/table_provider/read_json.rs:46-50 | src/daft-sql/src/table_provider/read_parquet.rs:23-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/table_provider/read_csv.rs:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/daft-functions-utf8/src/contains.rs:23— src/daft-functions-utf8/src/contains.rs:23-27 | src/daft-functions-utf8/src/endswith.rs:27-31 | src/daft-functions-utf8/src/startswith.rs:27-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/contains.rs:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/daft-core/src/series/ops/arithmetic.rs:245— src/daft-core/src/series/ops/arithmetic.rs:245-255 | src/daft-core/src/series/ops/arithmetic.rs:341-351 | src/daft-core/src/series/ops/arithmetic.rs:440-444 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/ops/arithmetic.rs:245` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/daft-dsl/src/expr/mod.rs:699— src/daft-dsl/src/expr/mod.rs:699-703 | src/daft-dsl/src/expr/mod.rs:707-711 | src/daft-dsl/src/expr/mod.rs:715-719 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) src/daft-writers/src/lance.rs:40— src/daft-writers/src/lance.rs:40-44 | src/daft-writers/src/pyarrow.rs:220-224 | src/daft-writers/src/sink.rs:40-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
daft_parquet::reader::build_rg_inputs (cognitive 28) src/daft-parquet/src/reader/mod.rs:322— daft_parquet::reader::build_rg_inputs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (6 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_parquet::helpers::refine_selection (cognitive 27) src/daft-parquet/src/helpers.rs:161— daft_parquet::helpers::refine_selection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_parquet::helpers::prune_row_groups (cognitive 21) src/daft-parquet/src/helpers.rs:241— daft_parquet::helpers::prune_row_groups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (5 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_parquet::helpers::bool_array_to_row_selection (cognitive 17) src/daft-parquet/src/helpers.rs:128— daft_parquet::helpers::bool_array_to_row_selection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_parquet::statistics::column_range::parquet_statistics_to_column_range_statistics (cognitive 17) src/daft-parquet/src/statistics/column_range.rs:89— daft_parquet::statistics::column_range::parquet_statistics_to_column_range_statistics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_parquet::read::read_parquet (cognitive 16) src/daft-parquet/src/read.rs:181— daft_parquet::read::read_parquet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_parquet::reader::rg_processor::process_rg_predicate_only (cognitive 16) src/daft-parquet/src/reader/rg_processor.rs:216— daft_parquet::reader::rg_processor::process_rg_predicate_only has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 8 (13 pts), if/else 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Duplicated block (12–13 lines × 2) src/daft-core/src/kernels/search_sorted.rs:128— src/daft-core/src/kernels/search_sorted.rs:128-140 | src/daft-core/src/kernels/search_sorted.rs:297-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/kernels/search_sorted.rs:128` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) src/daft-csv/src/local.rs:628— src/daft-csv/src/local.rs:628-639 | src/daft-warc/src/lib.rs:598-610 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-warc/src/lib.rs:598` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) src/daft-distributed/src/pipeline_node/join/asof_join.rs:152— src/daft-distributed/src/pipeline_node/join/asof_join.rs:152-163 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:144-156 — before extracting anything, compare `src/daft-distributed/src/pipeline_node/join/asof_join.rs` and `src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/join/asof_join.rs:152` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) src/daft-distributed/src/pipeline_node/sort.rs:664— src/daft-distributed/src/pipeline_node/sort.rs:664-676 | src/daft-distributed/src/pipeline_node/top_n.rs:86-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/sort.rs:664` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) src/daft-io/src/object_store_glob.rs:524— src/daft-io/src/object_store_glob.rs:524-535 | src/daft-io/src/object_store_glob.rs:630-642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/object_store_glob.rs:524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) src/daft-local-execution/src/join/inner_join.rs:26— src/daft-local-execution/src/join/inner_join.rs:26-38 | src/daft-local-execution/src/join/left_right_join.rs:111-122 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/left_right_join.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/inner_join.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:125— src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:125-137 | src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:343-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 3) src/daft-core/src/array/growable/fixed_size_list_growable.rs:37— src/daft-core/src/array/growable/fixed_size_list_growable.rs:37-46 | src/daft-core/src/array/growable/python_growable.rs:30-40 | src/daft-core/src/array/growable/struct_growable.rs:45-54 — before extracting anything, compare `src/daft-core/src/array/growable/python_growable.rs` and `src/daft-core/src/array/growable/struct_growable.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/growable/fixed_size_list_growable.rs:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-core/src/array/growable/python_growable.rs:42` calls `with_capacity` and `src/daft-core/src/array/growable/struct_growable.rs:56` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) src/daft-ext/src/abi/arrow.rs:68— src/daft-ext/src/abi/arrow.rs:68-77 | src/daft-ext/src/abi/arrow.rs:87-96 | src/daft-ext/src/abi/arrow.rs:106-115 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) src/daft-ext/src/abi/arrow.rs:215— src/daft-ext/src/abi/arrow.rs:215-224 | src/daft-ext/src/abi/arrow.rs:234-243 | src/daft-ext/src/abi/arrow.rs:253-262 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) src/daft-io/src/object_store_glob.rs:491— src/daft-io/src/object_store_glob.rs:491-500 | src/daft-io/src/object_store_glob.rs:523-532 | src/daft-io/src/object_store_glob.rs:559-568 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/object_store_glob.rs:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/daft-recordbatch/src/ops/inline_agg.rs:1049— src/daft-recordbatch/src/ops/inline_agg.rs:1049-1058 | src/daft-recordbatch/src/ops/inline_agg.rs:1077-1086 | src/daft-recordbatch/src/ops/inline_agg.rs:1223-1232 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:1049` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/daft-scan/src/python.rs:92— src/daft-scan/src/python.rs:92-102 | src/daft-scan/src/python.rs:887-896 | src/daft-scan/src/python.rs:936-945 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/python.rs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/daft-json/src/inference.rs:148— src/daft-json/src/inference.rs:148-157 | src/daft-json/src/local.rs:468-477 | src/daft-json/src/schema.rs:215-224 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (9 lines × 3) src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:215— src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:215-223 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:225-233 | src/daft-distributed/src/pipeline_node/sort.rs:505-513 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) src/daft-distributed/src/python/mod.rs:129— src/daft-distributed/src/python/mod.rs:129-137 | src/daft-distributed/src/python/mod.rs:148-156 | src/daft-distributed/src/python/mod.rs:175-183 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/python/mod.rs:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/daft-local-execution/src/sinks/sort.rs:120— src/daft-local-execution/src/sinks/sort.rs:120-128 | src/daft-logical-plan/src/ops/sort.rs:89-97 | src/daft-logical-plan/src/ops/top_n.rs:134-142 — before extracting anything, compare `src/daft-logical-plan/src/ops/sort.rs` and `src/daft-logical-plan/src/ops/top_n.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/sort.rs:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/daft-local-execution/src/sinks/window_order_by_only.rs:198— src/daft-local-execution/src/sinks/window_order_by_only.rs:198-206 | src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:281-291 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:290-298 — before extracting anything, compare `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs` and `src/daft-local-execution/src/sinks/window_partition_and_order_by.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/window_order_by_only.rs:198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) src/daft-recordbatch/src/ops/joins/hash_join.rs:73— src/daft-recordbatch/src/ops/joins/hash_join.rs:73-81 | src/daft-recordbatch/src/ops/joins/hash_join.rs:178-186 | src/daft-recordbatch/src/ops/joins/hash_join.rs:374-382 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/joins/hash_join.rs:73` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-recordbatch/src/ops/joins/hash_join.rs:383` calls `set_bit` and `src/daft-recordbatch/src/ops/joins/hash_join.rs:187` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) src/daft-functions/src/monotonically_increasing_id.rs:28— src/daft-functions/src/monotonically_increasing_id.rs:28-36 | src/daft-functions/src/uuid.rs:50-58 | src/daft-functions/src/uuid.rs:96-104 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/uuid.rs:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/daft-local-execution/src/sources/scan_task.rs:405— src/daft-local-execution/src/sources/scan_task.rs:405-413 | src/daft-micropartition/src/micropartition.rs:494-502 | src/daft-recordbatch/src/lib.rs:1980-1988 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 3) src/daft-dsl/src/python_udf/batch.rs:174— src/daft-dsl/src/python_udf/batch.rs:174-181 | src/daft-dsl/src/python_udf/batch.rs:217-224 | src/daft-dsl/src/python_udf/row_wise.rs:216-223 — before extracting anything, compare `src/daft-dsl/src/python_udf/batch.rs` and `src/daft-dsl/src/python_udf/row_wise.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udf/batch.rs:174` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) src/daft-decoding/src/deserialize.rs:217— src/daft-decoding/src/deserialize.rs:217-224 | src/daft-json/src/decoding.rs:335-342 | src/daft-json/src/inference.rs:231-238 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `time_unit` to `TimeUnit` in one and `&TimeUnit` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 3) src/daft-functions-utf8/src/lstrip.rs:27— src/daft-functions-utf8/src/lstrip.rs:27-34 | src/daft-functions-utf8/src/rstrip.rs:27-34 | src/daft-functions-utf8/src/strip.rs:27-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/lstrip.rs:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) src/daft-core/src/array/fixed_size_list_array.rs:180— src/daft-core/src/array/fixed_size_list_array.rs:180-190 | src/daft-core/src/array/list_array.rs:191-201 | src/daft-core/src/array/struct_array.rs:238-245 — before extracting anything, compare `src/daft-core/src/array/fixed_size_list_array.rs` and `src/daft-core/src/array/list_array.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/fixed_size_list_array.rs:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-core/src/array/list_array.rs:203` calls `clone` and `src/daft-core/src/array/fixed_size_list_array.rs:192` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) src/daft-sql/src/modules/config.rs:109— src/daft-sql/src/modules/config.rs:109-116 | src/daft-sql/src/modules/config.rs:280-287 | src/daft-sql/src/modules/config.rs:415-422 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) src/daft-functions-temporal/src/date_arithmetic.rs:180— src/daft-functions-temporal/src/date_arithmetic.rs:180-187 | src/daft-functions-temporal/src/date_arithmetic.rs:249-256 | src/daft-functions-temporal/src/date_arithmetic.rs:396-403 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_arithmetic.rs:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) benchmarking/tpch/answers.py:541— benchmarking/tpch/answers.py:541-548 | benchmarking/tpch/answers.py:551-558 | benchmarking/tpch/answers.py:561-568 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `benchmarking/tpch/answers.py:541` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/daft-functions/src/float/is_inf.rs:40— src/daft-functions/src/float/is_inf.rs:40-45 | src/daft-functions/src/float/is_nan.rs:42-47 | src/daft-functions/src/float/not_nan.rs:39-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/float/is_inf.rs:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/daft-recordbatch/src/ops/inline_agg.rs:162— src/daft-recordbatch/src/ops/inline_agg.rs:162-167 | src/daft-recordbatch/src/ops/inline_agg.rs:281-286 | src/daft-recordbatch/src/ops/inline_agg.rs:344-349 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:162` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/daft-core/src/kernels/hashing.rs:469— src/daft-core/src/kernels/hashing.rs:469-474 | src/daft-core/src/kernels/hashing.rs:518-523 | src/daft-core/src/kernels/hashing.rs:743-748 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/kernels/hashing.rs:469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/daft-functions-utf8/src/left.rs:125— src/daft-functions-utf8/src/left.rs:125-130 | src/daft-functions-utf8/src/repeat.rs:115-120 | src/daft-functions-utf8/src/right.rs:136-141 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/left.rs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/daft-micropartition/src/python.rs:1075— src/daft-micropartition/src/python.rs:1075-1080 | src/daft-micropartition/src/python.rs:1112-1117 | src/daft-micropartition/src/python.rs:1149-1154 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-micropartition/src/python.rs:1075` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/daft-catalog/src/python/wrappers.rs:61— src/daft-catalog/src/python/wrappers.rs:61-66 | src/daft-catalog/src/python/wrappers.rs:80-85 | src/daft-catalog/src/python/wrappers.rs:150-155 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-catalog/src/python/wrappers.rs:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) daft/catalog/__gravitino/_catalog.py:39— daft/catalog/__gravitino/_catalog.py:39-44 | daft/catalog/__iceberg.py:56-61 | daft/catalog/__unity/_catalog.py:34-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
daft_json::local::read_json_array_impl (cognitive 28) src/daft-json/src/local.rs:121— daft_json::local::read_json_array_impl has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (12 pts), match/switch 3 (9 pts), if/else 4 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_json::read::read_json_single_into_tables (cognitive 19) src/daft-json/src/read.rs:140— daft_json::read::read_json_single_into_tables has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (3 pts), match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_json::inference::coerce_data_type (cognitive 18) src/daft-json/src/inference.rs:119— daft_json::inference::coerce_data_type has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_json::read::stream_json (cognitive 18) src/daft-json/src/read.rs:295— daft_json::read::stream_json has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_json::schema::infer_schema (cognitive 17) src/daft-json/src/schema.rs:144— daft_json::schema::infer_schema has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_json::decoding::deserialize_datetime_into (cognitive 16) src/daft-json/src/decoding.rs:380— daft_json::decoding::deserialize_datetime_into has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×6
Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-core/src/array/ops/broadcast.rs:62— src/daft-core/src/array/ops/broadcast.rs:62-85 | src/daft-core/src/array/ops/broadcast.rs:89-106 | src/daft-core/src/array/ops/broadcast.rs:110-129 | src/daft-core/src/array/ops/broadcast.rs:133-152 | src/daft-core/src/array/ops/broadcast.rs:156-175 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-core/src/array/ops/compare_agg.rs:24— src/daft-core/src/array/ops/compare_agg.rs:24-51 | src/daft-core/src/array/ops/compare_agg.rs:106-132 | src/daft-core/src/array/ops/compare_agg.rs:165-191 | src/daft-core/src/array/ops/compare_agg.rs:224-257 | src/daft-core/src/array/ops/compare_agg.rs:297-327 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-csv/src/local.rs:195— src/daft-csv/src/local.rs:195-290 | src/daft-csv/src/read.rs:300-445 | src/daft-csv/src/read.rs:455-544 | src/daft-json/src/read.rs:148-260 | src/daft-json/src/read.rs:304-408 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-csv/src/read.rs:300— src/daft-csv/src/read.rs:300-445 | src/daft-csv/src/read.rs:455-544 | src/daft-json/src/read.rs:148-260 | src/daft-json/src/read.rs:304-408 | src/daft-warc/src/lib.rs:517-622 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-local-execution/src/concat.rs:133— src/daft-local-execution/src/concat.rs:133-153 | src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:341-361 | src/daft-local-execution/src/join/join_node.rs:88-108 | src/daft-local-execution/src/sinks/blocking_sink.rs:489-509 | src/daft-local-execution/src/streaming_sink/base.rs:474-494 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:320— src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:320-339 | src/daft-local-execution/src/join/join_node.rs:67-86 | src/daft-local-execution/src/sinks/blocking_sink.rs:469-487 | src/daft-local-execution/src/sources/source.rs:193-212 | src/daft-local-execution/src/streaming_sink/base.rs:453-472 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×6
Edited copy of a member (24 corresponding lines) src/daft-sql/src/modules/temporal.rs:931— src/daft-sql/src/modules/temporal.rs:931-957 | src/daft-sql/src/modules/temporal.rs:976-999 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/daft-functions-list/src/kernels.rs:1216— src/daft-functions-list/src/kernels.rs:1216-1239 | src/daft-functions-list/src/kernels.rs:1246-1273 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) daft/catalog/__gravitino/_client.py:170— daft/catalog/__gravitino/_client.py:170-193 | daft/catalog/__gravitino/_client.py:196-225 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/daft-core/src/series/ops/agg.rs:448— src/daft-core/src/series/ops/agg.rs:448-471 | src/daft-core/src/series/ops/agg.rs:473-497 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) daft/dataframe/dataframe.py:99— daft/dataframe/dataframe.py:99-122 | daft/dataframe/dataframe.py:857-887 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/daft-distributed/src/pipeline_node/actor_udf.rs:145— src/daft-distributed/src/pipeline_node/actor_udf.rs:145-173 | src/daft-distributed/src/pipeline_node/project.rs:34-57 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×6
Edited copy of a member (3 corresponding lines) daft/recordbatch/micropartition.py:107— daft/recordbatch/micropartition.py:107-109 | daft/recordbatch/recordbatch.py:112-114 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) daft/recordbatch/micropartition.py:272— daft/recordbatch/micropartition.py:272-274 | daft/recordbatch/recordbatch.py:311-313 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) daft/recordbatch/micropartition.py:199— daft/recordbatch/micropartition.py:199-201 | daft/recordbatch/recordbatch.py:236-238 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) daft/recordbatch/micropartition.py:211— daft/recordbatch/micropartition.py:211-213 | daft/recordbatch/recordbatch.py:254-256 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) benchmarking/ai/document_embedding/daft_main.py:65— benchmarking/ai/document_embedding/daft_main.py:65-69 | benchmarking/ai/document_embedding/ray_data_main.py:49-51 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) daft/__init__.py:185— daft/__init__.py:185-187 | daft/io/__init__.py:53-55 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (20 lines × 2) src/daft-core/src/kernels/search_sorted.rs:45— src/daft-core/src/kernels/search_sorted.rs:45-64 | src/daft-core/src/kernels/search_sorted.rs:167-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/kernels/search_sorted.rs:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 2) src/daft-distributed/src/pipeline_node/join/asof_join.rs:114— src/daft-distributed/src/pipeline_node/join/asof_join.rs:114-133 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:111-130 — before extracting anything, compare `src/daft-distributed/src/pipeline_node/join/asof_join.rs` and `src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:910— src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:910-929 | src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:930-949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) src/daft-sql/src/modules/window.rs:75— src/daft-sql/src/modules/window.rs:75-94 | src/daft-sql/src/modules/window.rs:124-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/window.rs:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) src/daft-sql/src/table_provider/read_csv.rs:48— src/daft-sql/src/table_provider/read_csv.rs:48-67 | src/daft-sql/src/table_provider/read_parquet.rs:49-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/table_provider/read_csv.rs:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) daft/dataframe/dataframe.py:6222— daft/dataframe/dataframe.py:6222-6241 | daft/dataframe/dataframe.py:6321-6340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 3) src/daft-json/src/local.rs:153— src/daft-json/src/local.rs:153-163 | src/daft-json/src/local.rs:173-183 | src/daft-json/src/local.rs:365-375 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) src/daft-local-execution/src/join/join_node.rs:98— src/daft-local-execution/src/join/join_node.rs:98-108 | src/daft-local-execution/src/sinks/blocking_sink.rs:499-509 | src/daft-local-execution/src/streaming_sink/base.rs:484-494 — before extracting anything, compare `src/daft-local-execution/src/join/join_node.rs` and `src/daft-local-execution/src/sinks/blocking_sink.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/join_node.rs:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:105— src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:105-115 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:96-106 | src/daft-local-execution/src/sinks/window_partition_only.rs:82-92 — before extracting anything, compare `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs` and `src/daft-local-execution/src/sinks/window_partition_and_order_by.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:246— src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:246-256 | src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:262-272 | src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:288-298 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 3) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:553— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:553-563 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:581-591 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:647-657 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:553` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) src/daft-functions/src/numeric/exp.rs:40— src/daft-functions/src/numeric/exp.rs:40-50 | src/daft-functions/src/numeric/power.rs:45-55 | src/daft-functions/src/numeric/trigonometry.rs:44-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/numeric/exp.rs:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Hotspot: src/daft-sql/src/planner.rs src/daft-sql/src/planner.rs:1645— src/daft-sql/src/planner.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 136 in SQLPlanner::plan_expr at line 1645. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 21:24:03 -08:00' --until='2026-11-08 21:24:03 -08:00' --full-history --no-merges -- src/daft-sql/src/planner.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: daft/dataframe/dataframe.py daft/dataframe/dataframe.py:2424— daft/dataframe/dataframe.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in DataFrame.write_lance at line 2424. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 21:24:03 -08:00' --until='2026-11-08 21:24:03 -08:00' --full-history --no-merges -- daft/dataframe/dataframe.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/daft-scan/src/glob.rs src/daft-scan/src/glob.rs:153— src/daft-scan/src/glob.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in GlobScanOperator::try_new at line 153. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 21:24:03 -08:00' --until='2026-11-08 21:24:03 -08:00' --full-history --no-merges -- src/daft-scan/src/glob.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/daft-io/src/azure_blob.rs src/daft-io/src/azure_blob.rs:703— src/daft-io/src/azure_blob.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AzureBlobSource::list_directory_delimiter_stream at line 703. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 21:24:03 -08:00' --until='2026-11-08 21:24:03 -08:00' --full-history --no-merges -- src/daft-io/src/azure_blob.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/daft-logical-plan/src/optimization/rules/push_down_limit.rs src/daft-logical-plan/src/optimization/rules/push_down_limit.rs:45— src/daft-logical-plan/src/optimization/rules/push_down_limit.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in PushDownLimit::try_optimize_node at line 45. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 21:24:03 -08:00' --until='2026-11-08 21:24:03 -08:00' --full-history --no-merges -- src/daft-logical-plan/src/optimization/rules/push_down_limit.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
daft_io::object_store_glob::glob::visit (cognitive 78) src/daft-io/src/object_store_glob.rs:431— daft_io::object_store_glob::glob::visit has cognitive complexity 78 (threshold 15). Drivers by points: if/else 15 (48 pts), match/switch 6 (21 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (daft_io::object_store_glob::glob) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
daft_io::s3_like::build_s3_conf (cognitive 32) src/daft-io/src/s3_like.rs:503— daft_io::s3_like::build_s3_conf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 3, loops 1 (3 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_io::object_store_glob::glob (cognitive 27) src/daft-io/src/object_store_glob.rs:352— daft_io::object_store_glob::glob has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22 (62 pts), match/switch 8 (28 pts), loops 5 (11 pts), boolean chains 4 (nesting depth added 66). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (daft_io::object_store_glob::glob::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
daft_io::object_store_glob::ls_with_prefix_fallback (cognitive 17) src/daft-io/src/object_store_glob.rs:233— daft_io::object_store_glob::ls_with_prefix_fallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (prefix_ls). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
daft_io::utils::group_glob_paths (cognitive 17) src/daft-io/src/utils.rs:56— daft_io::utils::group_glob_paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 5 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_logical_plan::ops::project::replace_column_with_semantic_id (cognitive 61) src/daft-logical-plan/src/ops/project.rs:268— daft_logical_plan::ops::project::replace_column_with_semantic_id has cognitive complexity 61 (threshold 15). Drivers by points: if/else 24 (49 pts), boolean chains 5, match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_logical_plan::optimization::rules::split_udfs::split_projection (cognitive 27) src/daft-logical-plan/src/optimization/rules/split_udfs.rs:394— daft_logical_plan::optimization::rules::split_udfs::split_projection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (10 pts), match/switch 1 (nesting depth added 16). Of this number, 26 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_logical_plan::optimization::rules::unnest_subquery::pull_up_correlated_cols (cognitive 22) src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:384— daft_logical_plan::optimization::rules::unnest_subquery::pull_up_correlated_cols has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_logical_plan::builder::resolve_expr::expand_wildcard (cognitive 19) src/daft-logical-plan/src/builder/resolve_expr.rs:21— daft_logical_plan::builder::resolve_expr::expand_wildcard has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 6 (8 pts) (nesting depth added 8). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_logical_plan::ops::project::replace_column_with_semantic_id_aggexpr (cognitive 16) src/daft-logical-plan/src/ops/project.rs:549— daft_logical_plan::ops::project::replace_column_with_semantic_id_aggexpr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Change-coupling hub: drop_repartition.rs → mod.rs, push_down_filter.rs, push_down_limit.rs, push_down_projection.rs src/daft-logical-plan/src/optimization/rules/drop_repartition.rs— `src/daft-logical-plan/src/optimization/rules/drop_repartition.rs` changes together with 4 other files — `src/daft-logical-plan/src/builder/mod.rs`, `src/daft-logical-plan/src/optimization/rules/push_down_filter.rs`, `src/daft-logical-plan/src/optimization/rules/push_down_limit.rs`, `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: source.rs → filter.rs, intermediate_op.rs, blocking_sink.rs, base.rs src/daft-local-execution/src/sources/source.rs— `src/daft-local-execution/src/sources/source.rs` changes together with 4 other files — `src/daft-local-execution/src/intermediate_ops/filter.rs`, `src/daft-local-execution/src/intermediate_ops/intermediate_op.rs`, `src/daft-local-execution/src/sinks/blocking_sink.rs`, `src/daft-local-execution/src/streaming_sink/base.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: run.rs → intermediate_op.rs, blocking_sink.rs, in_memory.rs, source.rs, base.rs src/daft-local-execution/src/run.rs— `src/daft-local-execution/src/run.rs` changes together with 5 other files — `src/daft-local-execution/src/intermediate_ops/intermediate_op.rs`, `src/daft-local-execution/src/sinks/blocking_sink.rs`, `src/daft-local-execution/src/sources/in_memory.rs`, `src/daft-local-execution/src/sources/source.rs`, `src/daft-local-execution/src/streaming_sink/base.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
Change-coupling hub: push_down_limit.rs → push_down_filter.rs, push_down_projection.rs, unnest_subquery.rs src/daft-logical-plan/src/optimization/rules/push_down_limit.rs— `src/daft-logical-plan/src/optimization/rules/push_down_limit.rs` changes together with 3 other files — `src/daft-logical-plan/src/optimization/rules/push_down_filter.rs`, `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs`, `src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: materialize.rs → limit.rs, mod.rs, dispatcher.rs src/daft-distributed/src/pipeline_node/materialize.rs— `src/daft-distributed/src/pipeline_node/materialize.rs` changes together with 3 other files — `src/daft-distributed/src/pipeline_node/limit.rs`, `src/daft-distributed/src/python/mod.rs`, `src/daft-distributed/src/scheduling/dispatcher.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×5
Edited copy of a member (25 corresponding lines) src/daft-functions-temporal/src/date_arithmetic.rs:217— src/daft-functions-temporal/src/date_arithmetic.rs:217-241 | src/daft-functions-temporal/src/date_arithmetic.rs:346-385 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/daft-core/src/array/struct_array.rs:135— src/daft-core/src/array/struct_array.rs:135-159 | src/daft-core/src/array/union_array.rs:155-179 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/daft-recordbatch/src/lib.rs:1810— src/daft-recordbatch/src/lib.rs:1810-1834 | src/daft-stats/src/table_stats.rs:183-208 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/daft-io/src/gravitino.rs:168— src/daft-io/src/gravitino.rs:168-206 | src/daft-io/src/unity.rs:129-153 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/common/io-config/src/cos.rs:125— src/common/io-config/src/cos.rs:125-149 | src/common/io-config/src/tos.rs:123-150 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×5
Edited copies of one member (3 members, 12+ corresponding lines) src/daft-recordbatch/src/lib.rs:1623— src/daft-recordbatch/src/lib.rs:1623-1634 | src/daft-recordbatch/src/lib.rs:1640-1651 | src/daft-recordbatch/src/lib.rs:1653-1666 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/daft-sql/src/modules/image/decode.rs:16— src/daft-sql/src/modules/image/decode.rs:16-29 | src/daft-sql/src/modules/image/encode.rs:16-31 | src/daft-sql/src/modules/image/to_mode.rs:15-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/daft-functions/src/uuid.rs:208— src/daft-functions/src/uuid.rs:208-219 | src/daft-image/src/functions/attribute.rs:38-51 | src/daft-image/src/functions/encode.rs:45-57 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/daft-local-execution/src/sinks/window_order_by_only.rs:44— src/daft-local-execution/src/sinks/window_order_by_only.rs:44-55 | src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:70-86 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:65-77 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:385— src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:385-396 | src/daft-local-execution/src/join/join_node.rs:135-151 | src/daft-local-execution/src/streaming_sink/base.rs:518-529 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×5
Edited copies of one member (3 members, 13+ corresponding lines) src/daft-distributed/src/pipeline_node/window.rs:90— src/daft-distributed/src/pipeline_node/window.rs:90-103 | src/daft-distributed/src/pipeline_node/window.rs:139-154 | src/daft-distributed/src/pipeline_node/window.rs:193-205 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) src/daft-ext/src/aggregate.rs:63— src/daft-ext/src/aggregate.rs:63-75 | src/daft-ext/src/aggregate.rs:84-97 | src/daft-ext/src/function.rs:52-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) src/daft-core/src/array/fixed_size_list_array.rs:178— src/daft-core/src/array/fixed_size_list_array.rs:178-194 | src/daft-core/src/array/list_array.rs:189-206 | src/daft-core/src/array/struct_array.rs:236-248 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) src/daft-decoding/src/deserialize.rs:129— src/daft-decoding/src/deserialize.rs:129-147 | src/daft-decoding/src/deserialize.rs:153-165 | src/daft-decoding/src/deserialize.rs:171-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) src/daft-catalog/src/impls/memory.rs:317— src/daft-catalog/src/impls/memory.rs:317-329 | src/daft-catalog/src/impls/memory.rs:421-433 | src/daft-catalog/src/table.rs:161-173 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (22 lines × 2) src/daft-distributed/src/pipeline_node/actor_udf.rs:255— src/daft-distributed/src/pipeline_node/actor_udf.rs:255-276 | src/daft-distributed/src/pipeline_node/udf.rs:189-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/actor_udf.rs:255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) src/daft-dsl/src/expr/mod.rs:561— src/daft-dsl/src/expr/mod.rs:561-582 | src/daft-dsl/src/expr/mod.rs:738-759 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/expr/mod.rs:561` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) src/daft-micropartition/src/micropartition.rs:292— src/daft-micropartition/src/micropartition.rs:292-313 | src/daft-micropartition/src/micropartition.rs:384-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-micropartition/src/micropartition.rs:292` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:1000— src/daft-recordbatch/src/ops/inline_agg.rs:1000-1021 | src/daft-recordbatch/src/ops/inline_agg.rs:1091-1112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:1000` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) src/daft-scan/src/python/wrappers.rs:223— src/daft-scan/src/python/wrappers.rs:223-244 | src/daft-scan/src/python/wrappers.rs:404-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/python/wrappers.rs:223` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-scan/src/python/wrappers.rs:220` calls `call_method1`, `Ok`, `datasource_task_ref_from_py` and `src/daft-scan/src/python/wrappers.rs:403` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18 lines × 2) src/daft-functions-utf8/src/regexp_extract.rs:30— src/daft-functions-utf8/src/regexp_extract.rs:30-47 | src/daft-functions-utf8/src/regexp_extract_all.rs:32-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/regexp_extract.rs:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/daft-io/src/azure_blob.rs:741— src/daft-io/src/azure_blob.rs:741-758 | src/daft-io/src/azure_blob.rs:800-817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/azure_blob.rs:741` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/daft-mcap/src/read.rs:434— src/daft-mcap/src/read.rs:434-451 | src/daft-mcap/src/read.rs:462-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) src/daft-recordbatch/src/lib.rs:1011— src/daft-recordbatch/src/lib.rs:1011-1028 | src/daft-recordbatch/src/lib.rs:1138-1155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) benchmarking/vllm/continuous-batch.py:14— benchmarking/vllm/continuous-batch.py:14-31 | benchmarking/vllm/prefix-bucketing.py:14-31 — before extracting anything, compare `benchmarking/vllm/continuous-batch.py` and `benchmarking/vllm/prefix-bucketing.py` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `benchmarking/vllm/continuous-batch.py:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/daft-functions-list/src/kernels.rs:468— src/daft-functions-list/src/kernels.rs:468-484 | src/daft-functions-list/src/kernels.rs:489-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/daft-functions-list/src/kernels.rs:880— src/daft-functions-list/src/kernels.rs:880-896 | src/daft-functions-list/src/kernels.rs:900-916 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/daft-local-execution/src/sinks/sort.rs:112— src/daft-local-execution/src/sinks/sort.rs:112-128 | src/daft-local-execution/src/sinks/top_n.rs:156-172 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17 lines × 2) src/daft-logical-plan/src/ops/sort.rs:81— src/daft-logical-plan/src/ops/sort.rs:81-97 | src/daft-logical-plan/src/ops/top_n.rs:126-142 — before extracting anything, compare `src/daft-logical-plan/src/ops/sort.rs` and `src/daft-logical-plan/src/ops/top_n.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) benchmarking/vllm/naive-batch-sorted.py:45— benchmarking/vllm/naive-batch-sorted.py:45-61 | benchmarking/vllm/naive-batch.py:44-60 — before extracting anything, compare `benchmarking/vllm/naive-batch-sorted.py` and `benchmarking/vllm/naive-batch.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `benchmarking/vllm/naive-batch-sorted.py:44` calls `sort` and `benchmarking/vllm/naive-batch.py:43` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 3) src/daft-distributed/src/pipeline_node/aggregate.rs:196— src/daft-distributed/src/pipeline_node/aggregate.rs:196-207 | src/daft-distributed/src/pipeline_node/aggregate.rs:209-220 | src/daft-local-execution/src/sinks/grouped_aggregate.rs:280-291 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 3) src/daft-distributed/src/pipeline_node/window.rs:111— src/daft-distributed/src/pipeline_node/window.rs:111-122 | src/daft-distributed/src/pipeline_node/window.rs:162-173 | src/daft-distributed/src/pipeline_node/window.rs:209-220 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) src/daft-functions-temporal/src/epoch_conversions.rs:68— src/daft-functions-temporal/src/epoch_conversions.rs:68-79 | src/daft-functions-temporal/src/epoch_conversions.rs:110-121 | src/daft-functions-temporal/src/epoch_conversions.rs:151-162 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 3) src/daft-local-execution/src/join/probe.rs:244— src/daft-local-execution/src/join/probe.rs:244-255 | src/daft-local-execution/src/join/probe.rs:295-306 | src/daft-local-execution/src/join/probe.rs:377-388 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/probe.rs:244` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:306— src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:306-317 | src/daft-logical-plan/src/optimization/rules/push_down_filter.rs:467-478 | src/daft-logical-plan/src/optimization/rules/push_down_limit.rs:296-307 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-logical-plan/src/optimization/rules/push_down_limit.rs:295` calls `Shuffle` and `src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:305` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Low cohesion: WindowSpec (LCOM4 5) src/daft-dsl/src/expr/window.rs:92— WindowSpec's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Series (LCOM4 4) src/daft-core/src/series/mod.rs:32— Series's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WriteSink (LCOM4 4) src/daft-local-execution/src/sinks/write.rs:173— WriteSink's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: VLLMSink (LCOM4 4) src/daft-local-execution/src/streaming_sink/vllm.rs:34— VLLMSink's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Source (LCOM4 4) src/daft-logical-plan/src/ops/source.rs:16— Source's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
SQLPlanner::plan_expr (cyclomatic 136) src/daft-sql/src/planner.rs:1645— SQLPlanner::plan_expr has cyclomatic complexity 136 (threshold 15). Of this number, 113 points are the body's own statements and 23 belong to 2 function items inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SQLPlanner::plan_query (cyclomatic 36) src/daft-sql/src/planner.rs:398— SQLPlanner::plan_query has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SQLPlanner::plan_relation (cyclomatic 20) src/daft-sql/src/planner.rs:1032— SQLPlanner::plan_relation has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SQLPlanner::plan_single_from (cyclomatic 18) src/daft-sql/src/planner.rs:914— SQLPlanner::plan_single_from has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Func.__call__ (cyclomatic 18) REDACTED:271— Func.__call__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Func.__call__ (cyclomatic 18) REDACTED:273— Func.__call__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Func.__call__ (cyclomatic 18) REDACTED:275— Func.__call__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Func.__call__ (cyclomatic 18) REDACTED:277— Func.__call__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecordBatch::eval_expression_async_with_metrics (cognitive 68) src/daft-recordbatch/src/lib.rs:882— RecordBatch::eval_expression_async_with_metrics has cognitive complexity 68 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 7 (14 pts), match/switch 5 (10 pts), boolean chains 4 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RecordBatch::eval_expression_internal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecordBatch::eval_expression_internal (cognitive 68) src/daft-recordbatch/src/lib.rs:1294— RecordBatch::eval_expression_internal has cognitive complexity 68 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 7 (14 pts), match/switch 5 (10 pts), boolean chains 4 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RecordBatch::eval_expression_async_with_metrics) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecordBatch::explode (cognitive 32) src/daft-recordbatch/src/ops/explode.rs:55— RecordBatch::explode has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecordBatch::calculate_range_frame_bounds (cognitive 19) src/daft-recordbatch/src/ops/window.rs:147— RecordBatch::calculate_range_frame_bounds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_recordbatch::ops::joins::merge_join::merge_inner_join (cognitive 35) src/daft-recordbatch/src/ops/joins/merge_join.rs:43— daft_recordbatch::ops::joins::merge_join::merge_inner_join has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 7 (19 pts), if/else 7 (10 pts), boolean chains 3, loops 3 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_recordbatch::ops::joins::hash_join::hash_outer_join (cognitive 27) src/daft-recordbatch/src/ops/joins/hash_join.rs:307— daft_recordbatch::ops::joins::hash_join::hash_outer_join has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_recordbatch::ops::joins::hash_join::hash_left_right_join (cognitive 20) src/daft-recordbatch/src/ops/joins/hash_join.rs:117— daft_recordbatch::ops::joins::hash_join::hash_left_right_join has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_recordbatch::ops::joins::hash_join::hash_inner_join (cognitive 19) src/daft-recordbatch/src/ops/joins/hash_join.rs:19— daft_recordbatch::ops::joins::hash_join::hash_inner_join has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_csv::read::read_csv_single_into_table (cognitive 24) src/daft-csv/src/read.rs:292— daft_csv::read::read_csv_single_into_table has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (3 pts), boolean chains 2, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_csv::metadata::infer_schema (cognitive 19) src/daft-csv/src/metadata.rs:203— daft_csv::metadata::infer_schema has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_csv::read::stream_csv (cognitive 19) src/daft-csv/src/read.rs:168— daft_csv::read::stream_csv has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_csv::read::stream_csv_single (cognitive 16) src/daft-csv/src/read.rs:447— daft_csv::read::stream_csv_single has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Func.__call__ (cognitive 22) REDACTED:271— Func.__call__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (8 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Func.__call__ (cognitive 22) REDACTED:273— Func.__call__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (8 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Func.__call__ (cognitive 22) REDACTED:275— Func.__call__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (8 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Func.__call__ (cognitive 22) REDACTED:277— Func.__call__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (8 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (Func.__call__, Func.__call__, Func.__call__) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
daft_functions_utf8::jaro::compute_jaro_similarity (cognitive 19) src/daft-functions-utf8/src/jaro.rs:8— daft_functions_utf8::jaro::compute_jaro_similarity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_functions_utf8::normalize::normalize_impl (cognitive 19) src/daft-functions-utf8/src/normalize.rs:60— daft_functions_utf8::normalize::normalize_impl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_functions_utf8::substr::substr_impl (cognitive 18) src/daft-functions-utf8/src/substr.rs:109— daft_functions_utf8::substr::substr_impl has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_functions_utf8::to_datetime::to_datetime_impl (cognitive 16) src/daft-functions-utf8/src/to_datetime.rs:100— daft_functions_utf8::to_datetime::to_datetime_impl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 5 (8 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×4
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×4
Edited copy of a member (45 corresponding lines) src/daft-logical-plan/src/logical_plan.rs:1103— src/daft-logical-plan/src/logical_plan.rs:1103-1147 | src/daft-logical-plan/src/logical_plan.rs:1149-1193 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) src/daft-functions-list/src/kernels.rs:527— src/daft-functions-list/src/kernels.rs:527-575 | src/daft-functions-list/src/kernels.rs:577-621 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) src/daft-local-execution/src/join/left_right_join.rs:176— src/daft-local-execution/src/join/left_right_join.rs:176-220 | src/daft-local-execution/src/join/left_right_join.rs:225-269 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) src/daft-io/src/http.rs:164— src/daft-io/src/http.rs:164-208 | src/daft-io/src/http.rs:215-264 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×4
Edited copy of a member (34 corresponding lines) src/daft-distributed/src/pipeline_node/sink.rs:292— src/daft-distributed/src/pipeline_node/sink.rs:292-325 | src/daft-logical-plan/src/ops/sink.rs:91-124 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) src/daft-core/src/kernels/hashing.rs:468— src/daft-core/src/kernels/hashing.rs:468-501 | src/daft-core/src/kernels/hashing.rs:515-552 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) src/common/io-config/src/cos.rs:155— src/common/io-config/src/cos.rs:155-188 | src/common/io-config/src/tos.rs:156-189 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) src/daft-functions-temporal/src/time.rs:202— src/daft-functions-temporal/src/time.rs:202-235 | src/daft-functions-temporal/src/time.rs:276-316 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) src/daft-distributed/src/pipeline_node/pivot.rs:102— src/daft-distributed/src/pipeline_node/pivot.rs:102-122 | src/daft-distributed/src/pipeline_node/unpivot.rs:99-117 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/daft-functions-utf8/src/split.rs:193— src/daft-functions-utf8/src/split.rs:193-211 | src/daft-functions-utf8/src/split.rs:218-236 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/daft-functions-temporal/src/truncate.rs:42— src/daft-functions-temporal/src/truncate.rs:42-62 | src/daft-functions-utf8/src/substr.rs:80-98 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) daft/catalog/__glue.py:223— daft/catalog/__glue.py:223-241 | daft/catalog/__s3tables.py:268-289 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×4
Edited copies of one member (3 members, 16+ corresponding lines) src/daft-functions-temporal/src/date_arithmetic.rs:175— src/daft-functions-temporal/src/date_arithmetic.rs:175-193 | src/daft-functions-temporal/src/date_arithmetic.rs:247-262 | src/daft-functions-temporal/src/date_arithmetic.rs:391-409 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) src/daft-functions/src/numeric/log.rs:38— src/daft-functions/src/numeric/log.rs:38-53 | src/daft-functions/src/numeric/log.rs:107-122 | src/daft-functions/src/numeric/pow.rs:41-56 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) src/daft-local-execution/src/sources/glob_scan.rs:210— src/daft-local-execution/src/sources/glob_scan.rs:210-230 | src/daft-local-execution/src/sources/in_memory.rs:132-147 | src/daft-local-execution/src/sources/scan_task.rs:233-252 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) src/daft-dashboard/src/engine.rs:939— src/daft-dashboard/src/engine.rs:939-954 | src/daft-dashboard/src/engine.rs:968-989 | src/daft-dashboard/src/engine.rs:1033-1052 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×4
Edited copies of one member (4 members, 12+ corresponding lines) src/daft-functions-temporal/src/time.rs:103— src/daft-functions-temporal/src/time.rs:103-126 | src/daft-functions-temporal/src/time.rs:158-172 | src/daft-functions-temporal/src/time.rs:241-252 | src/daft-functions-temporal/src/time.rs:322-333 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:289— src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:289-308 | src/daft-local-execution/src/join/join_node.rs:42-55 | src/daft-local-execution/src/sinks/blocking_sink.rs:168-179 | src/daft-local-execution/src/streaming_sink/base.rs:428-441 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) src/daft-file/src/functions.rs:470— src/daft-file/src/functions.rs:470-481 | src/daft-functions/src/float/is_inf.rs:38-49 | src/daft-functions/src/float/is_nan.rs:40-51 | src/daft-functions/src/float/not_nan.rs:37-48 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) src/daft-core/src/array/iterator.rs:31— src/daft-core/src/array/iterator.rs:31-42 | src/daft-core/src/array/iterator.rs:52-63 | src/daft-core/src/array/iterator.rs:101-112 | src/daft-core/src/array/iterator.rs:122-133 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×4
Edited copies of one member (3 members, 9+ corresponding lines) src/daft-logical-plan/src/optimization/rules/reorder_joins/dp_ccp_join_order.rs:42— src/daft-logical-plan/src/optimization/rules/reorder_joins/dp_ccp_join_order.rs:42-53 | src/daft-logical-plan/src/optimization/rules/reorder_joins/dp_ccp_join_order.rs:61-69 | src/daft-logical-plan/src/optimization/rules/reorder_joins/dp_ccp_join_order.rs:81-90 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) src/daft-ext-internal/src/module.rs:146— src/daft-ext-internal/src/module.rs:146-156 | src/daft-ext-internal/src/module.rs:189-197 | src/daft-ext-internal/src/module.rs:204-212 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) daft/catalog/__glue.py:485— daft/catalog/__glue.py:485-496 | daft/catalog/__gravitino/_catalog.py:199-208 | daft/catalog/__iceberg.py:287-295 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) src/daft-local-execution/src/sinks/aggregate.rs:33— src/daft-local-execution/src/sinks/aggregate.rs:33-41 | src/daft-local-execution/src/sinks/pivot.rs:32-40 | src/daft-local-execution/src/sinks/sort.rs:32-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) src/daft-functions/src/numeric/e.rs:28— src/daft-functions/src/numeric/e.rs:28-33 | src/daft-functions/src/numeric/pi.rs:28-33 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) benchmarking/ai/audio_transcription/ray_data_main.py:66— benchmarking/ai/audio_transcription/ray_data_main.py:66-71 | benchmarking/ai/audio_transcription/daft_main.py:70-75 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) daft/io/delta_lake/_visitors.py:223— daft/io/delta_lake/_visitors.py:223-228 | daft/io/paimon/_predicate_visitor.py:97-103 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/common/io-config/src/python.rs:499— src/common/io-config/src/python.rs:499-506 | src/daft-dashboard/src/import.rs:69-74 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×4
Edited copies of one member (3 members, 6+ corresponding lines) src/daft-functions-uri/src/download.rs:102— src/daft-functions-uri/src/download.rs:102-107 | src/daft-functions/src/minhash.rs:52-66 | src/daft-functions/src/simhash.rs:150-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) src/daft-functions-json/src/jq.rs:31— src/daft-functions-json/src/jq.rs:31-36 | src/daft-functions-json/src/json_array_length.rs:30-39 | src/daft-functions-json/src/json_object_keys.rs:43-55 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) daft/catalog/__iceberg.py:279— daft/catalog/__iceberg.py:279-284 | daft/catalog/__paimon.py:269-274 | daft/catalog/__unity/_catalog.py:154-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) src/daft-file/src/functions.rs:66— src/daft-file/src/functions.rs:66-72 | src/daft-functions-list/src/count.rs:44-49 | src/daft-functions-list/src/list_map.rs:47-53 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×4
Edited copy of a member (5 corresponding lines) daft/functions/image.py:86— daft/functions/image.py:86-100 | daft/series.py:1179-1183 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/daft-functions/src/numeric/mod.rs:62— src/daft-functions/src/numeric/mod.rs:62-66 | src/daft-functions/src/numeric/round.rs:45-52 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/daft-functions-utf8/src/ilike.rs:26— src/daft-functions-utf8/src/ilike.rs:26-30 | src/daft-functions-utf8/src/like.rs:27-31 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/daft-ext-internal/src/aggregate.rs:73— src/daft-ext-internal/src/aggregate.rs:73-80 | src/daft-ext-internal/src/function.rs:92-96 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (21 lines × 2) src/daft-core/src/array/struct_array.rs:139— src/daft-core/src/array/struct_array.rs:139-159 | src/daft-core/src/array/union_array.rs:159-179 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/struct_array.rs:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/daft-dsl/src/python.rs:211— src/daft-dsl/src/python.rs:211-231 | src/daft-dsl/src/python.rs:275-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python.rs:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/daft-recordbatch/src/lib.rs:1811— src/daft-recordbatch/src/lib.rs:1811-1831 | src/daft-stats/src/table_stats.rs:184-204 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) daft/dataframe/dataframe.py:99— daft/dataframe/dataframe.py:99-119 | daft/dataframe/dataframe.py:857-877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) src/daft-core/src/array/fixed_size_list_array.rs:83— src/daft-core/src/array/fixed_size_list_array.rs:83-101 | src/daft-core/src/array/list_array.rs:94-112 — before extracting anything, compare `src/daft-core/src/array/fixed_size_list_array.rs` and `src/daft-core/src/array/list_array.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/fixed_size_list_array.rs:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/daft-logical-plan/src/logical_plan.rs:1048— src/daft-logical-plan/src/logical_plan.rs:1048-1066 | src/daft-logical-plan/src/logical_plan.rs:1083-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/logical_plan.rs:1048` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/common/macros/src/function_args.rs:360— src/common/macros/src/function_args.rs:360-378 | src/common/macros/src/function_args.rs:384-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/macros/src/function_args.rs:360` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/daft-image/src/functions/resize.rs:59— src/daft-image/src/functions/resize.rs:59-77 | src/daft-image/src/functions/resize.rs:84-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-image/src/functions/resize.rs:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 3) src/daft-functions-temporal/src/date_construction.rs:68— src/daft-functions-temporal/src/date_construction.rs:68-85 | src/daft-functions-temporal/src/date_construction.rs:217-234 | src/daft-functions-temporal/src/date_construction.rs:384-401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18 lines × 3) src/daft-io/src/s3_like.rs:855— src/daft-io/src/s3_like.rs:855-872 | src/daft-io/src/s3_like.rs:928-945 | src/daft-io/src/s3_like.rs:1036-1053 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/s3_like.rs:855` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 3) src/daft-logical-plan/src/logical_plan.rs:436— src/daft-logical-plan/src/logical_plan.rs:436-453 | src/daft-logical-plan/src/logical_plan.rs:1034-1051 | src/daft-logical-plan/src/logical_plan.rs:1069-1086 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/logical_plan.rs:436` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-logical-plan/src/logical_plan.rs:1052` calls `Intersect`, `Union` and `src/daft-logical-plan/src/logical_plan.rs:454` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18 lines × 3) src/daft-recordbatch/src/ops/joins/hash_join.rs:151— src/daft-recordbatch/src/ops/joins/hash_join.rs:151-168 | src/daft-recordbatch/src/ops/joins/hash_join.rs:261-278 | src/daft-recordbatch/src/ops/joins/hash_join.rs:344-361 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–12 lines × 2) src/daft-functions-list/src/kernels.rs:478— src/daft-functions-list/src/kernels.rs:478-489 | src/daft-functions-list/src/kernels.rs:890-900 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:478` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11–12 lines × 2) src/daft-io/src/google_cloud.rs:271— src/daft-io/src/google_cloud.rs:271-282 | src/daft-io/src/google_cloud.rs:302-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–12 lines × 2) src/daft-local-execution/src/intermediate_ops/explode.rs:36— src/daft-local-execution/src/intermediate_ops/explode.rs:36-47 | src/daft-local-execution/src/runtime_stats/values.rs:58-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11–12 lines × 2) src/daft-recordbatch/src/lib.rs:896— src/daft-recordbatch/src/lib.rs:896-907 | src/daft-recordbatch/src/lib.rs:1304-1314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:896` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: hyperloglog — hyperloglog: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: daft-io — daft-io: abstractness 0.04, instability 0.18, distance 0.77 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Off the main sequence: daft-hash — daft-hash: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: daft-schema — daft-schema: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 15 project(s), so it's rigid to change.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×3
Animation without a prefers-reduced-motion guard src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:111— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard src/daft-dashboard/frontend/src/app/globals.css:87— `.fish-container` moves (`animation: up-down 1s alternate ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/daft-dashboard/frontend/src/app/globals.css:98— `.fish-swim` moves (`animation: rotate 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
RecordBatch::eval_expression_async_with_metrics (cyclomatic 73) src/daft-recordbatch/src/lib.rs:882— RecordBatch::eval_expression_async_with_metrics has cyclomatic complexity 73 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (RecordBatch::eval_expression_internal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecordBatch::eval_expression_internal (cyclomatic 73) src/daft-recordbatch/src/lib.rs:1294— RecordBatch::eval_expression_internal has cyclomatic complexity 73 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (RecordBatch::eval_expression_async_with_metrics) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecordBatch::eval_agg_expression (cyclomatic 32) src/daft-recordbatch/src/lib.rs:712— RecordBatch::eval_agg_expression has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Expr::to_field (cyclomatic 47) src/daft-dsl/src/expr/mod.rs:2038— Expr::to_field has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Expr::name (cyclomatic 33) src/daft-dsl/src/expr/mod.rs:2258— Expr::name has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Expr::semantic_id (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Expr::to_sql::to_sql_inner (cyclomatic 23) src/daft-dsl/src/expr/mod.rs:2354— Expr::to_sql::to_sql_inner has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Expr::semantic_id (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Literal::into_pyobject (cyclomatic 46) src/daft-core/src/lit/python.rs:47— Literal::into_pyobject has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Literal::from_pyobj (cyclomatic 45) src/daft-core/src/lit/python.rs:324— Literal::from_pyobj has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Literal::neg (cyclomatic 20) src/daft-core/src/lit/mod.rs:364— Literal::neg has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Literal::fmt (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
daft_io::object_store_glob::glob::visit (cyclomatic 31) src/daft-io/src/object_store_glob.rs:431— daft_io::object_store_glob::glob::visit has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_io::s3_like::build_s3_conf (cyclomatic 24) src/daft-io/src/s3_like.rs:503— daft_io::s3_like::build_s3_conf has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_io::parse_url (cyclomatic 21) src/daft-io/src/lib.rs:604— daft_io::parse_url has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_scan::expr_rewriter::rewrite_predicate_for_partitioning (cognitive 64) src/daft-scan/src/expr_rewriter.rs:84— daft_scan::expr_rewriter::rewrite_predicate_for_partitioning has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 11, match/switch 3 (6 pts), loops 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_scan::scan_task_iters::split_jsonl::split_by_jsonl_ranges (cognitive 25) src/daft-scan/src/scan_task_iters/split_jsonl/mod.rs:20— daft_scan::scan_task_iters::split_jsonl::split_by_jsonl_ranges has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_scan::scan_task_iters::split_by_row_groups (cognitive 24) src/daft-scan/src/scan_task_iters/mod.rs:194— daft_scan::scan_task_iters::split_by_row_groups has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
daft_local_execution::pipeline::physical_plan_to_pipeline (cognitive 61) src/daft-local-execution/src/pipeline.rs:436— daft_local_execution::pipeline::physical_plan_to_pipeline has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 14 (33 pts), if/else 13 (24 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 31). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_local_execution::run::run_execution_loop (cognitive 31) src/daft-local-execution/src/run.rs:332— daft_local_execution::run::run_execution_loop has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_local_execution::join::asof_join::nearest_fill (cognitive 22) src/daft-local-execution/src/join/asof_join.rs:580— daft_local_execution::join::asof_join::nearest_fill has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Literal::from_pyobj (cognitive 52) src/daft-core/src/lit/python.rs:324— Literal::from_pyobj has cognitive complexity 52 (threshold 15). Drivers by points: if/else 44 (48 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Literal::into_pyobject_with_map_conversion (cognitive 17) src/daft-core/src/lit/python.rs:258— Literal::into_pyobject_with_map_conversion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Literal::neg (cognitive 16) src/daft-core/src/lit/mod.rs:364— Literal::neg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AzureBlobSource::list_directory_delimiter_stream (cognitive 51) src/daft-io/src/azure_blob.rs:703— AzureBlobSource::list_directory_delimiter_stream has cognitive complexity 51 (threshold 15). Drivers by points: loops 5 (19 pts), match/switch 7 (18 pts), if/else 5 (14 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureBlobSource::list_containers_stream (cognitive 18) src/daft-io/src/azure_blob.rs:535— AzureBlobSource::list_containers_stream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (7 pts), match/switch 3 (6 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureBlobSource::get_client (cognitive 17) src/daft-io/src/azure_blob.rs:397— AzureBlobSource::get_client has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ListArray::list_flatten (cognitive 33) src/daft-functions-list/src/kernels.rs:217— ListArray::list_flatten has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (10 pts), match/switch 1 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ListArray::list_contains (cognitive 22) src/daft-functions-list/src/kernels.rs:623— ListArray::list_contains has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListArray::grouped_concat (cognitive 18) src/daft-core/src/array/ops/concat_agg.rs:69— ListArray::grouped_concat has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutionContext::process_input (cognitive 18) src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:210— ExecutionContext::process_input has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutionContext::process_input (cognitive 17) src/daft-local-execution/src/streaming_sink/base.rs:335— ExecutionContext::process_input has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutionContext::spawn_complete_input (cognitive 16) src/daft-local-execution/src/streaming_sink/base.rs:193— ExecutionContext::spawn_complete_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×3
Edited copy of a member (37 corresponding lines) src/daft-core/src/lit/deserializer.rs:284— src/daft-core/src/lit/deserializer.rs:284-320 | src/daft-core/src/lit/deserializer.rs:335-371 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) src/daft-local-execution/src/join/anti_semi_join.rs:76— src/daft-local-execution/src/join/anti_semi_join.rs:76-122 | src/daft-local-execution/src/join/outer_join.rs:19-55 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) src/daft-distributed/src/pipeline_node/shuffles/gather.rs:113— src/daft-distributed/src/pipeline_node/shuffles/gather.rs:113-149 | src/daft-distributed/src/pipeline_node/shuffles/repartition.rs:111-152 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×3
Edited copy of a member (31 corresponding lines) src/daft-functions/src/numeric/hypot.rs:61— src/daft-functions/src/numeric/hypot.rs:61-91 | src/daft-functions/src/numeric/trigonometry.rs:211-242 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) src/daft-dsl/src/expr/mod.rs:560— src/daft-dsl/src/expr/mod.rs:560-590 | src/daft-dsl/src/expr/mod.rs:737-767 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) src/daft-logical-plan/src/ops/sort.rs:31— src/daft-logical-plan/src/ops/sort.rs:31-61 | src/daft-logical-plan/src/ops/top_n.rs:52-85 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×3
Edited copy of a member (35 corresponding lines) src/common/image/src/cow_image.rs:262— src/common/image/src/cow_image.rs:262-296 | src/common/image/src/cow_image.rs:300-334 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) src/daft-ext-macros/src/types.rs:146— src/daft-ext-macros/src/types.rs:146-180 | src/daft-ext-macros/src/types.rs:182-217 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) src/daft-io/src/s3_like.rs:1088— src/daft-io/src/s3_like.rs:1088-1122 | src/daft-io/src/s3_like.rs:1527-1563 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×3
Edited copy of a member (27 corresponding lines) src/daft-functions/src/slice.rs:159— src/daft-functions/src/slice.rs:159-189 | src/daft-functions/src/slice.rs:197-223 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) src/daft-functions-utf8/src/find.rs:66— src/daft-functions-utf8/src/find.rs:66-92 | src/daft-functions-utf8/src/translate.rs:80-110 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) src/daft-sql/src/modules/temporal.rs:815— src/daft-sql/src/modules/temporal.rs:815-843 | src/daft-sql/src/modules/temporal.rs:1018-1044 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×3
Edited copy of a member (29 corresponding lines) src/daft-functions-utf8/src/regexp_extract.rs:83— src/daft-functions-utf8/src/regexp_extract.rs:83-111 | src/daft-functions-utf8/src/regexp_extract_all.rs:92-123 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/daft-writers/src/batch_file_writer.rs:103— src/daft-writers/src/batch_file_writer.rs:103-131 | src/daft-writers/src/parquet_writer.rs:414-456 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/daft-functions-temporal/src/date_navigation.rs:36— src/daft-functions-temporal/src/date_navigation.rs:36-64 | src/daft-functions-temporal/src/date_navigation.rs:118-146 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) src/daft-recordbatch/src/ops/inline_agg.rs:268— src/daft-recordbatch/src/ops/inline_agg.rs:268-293 | src/daft-recordbatch/src/ops/inline_agg.rs:331-356 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/daft-dsl/src/python_udf/batch.rs:96— src/daft-dsl/src/python_udf/batch.rs:96-122 | src/daft-dsl/src/python_udf/row_wise.rs:92-117 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:166— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:166-199 | src/daft-distributed/src/pipeline_node/join/key_filtering_join.rs:157-182 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) src/daft-io/src/google_cloud.rs:270— src/daft-io/src/google_cloud.rs:270-299 | src/daft-io/src/google_cloud.rs:301-337 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) src/daft-ext-internal/src/aggregate.rs:324— src/daft-ext-internal/src/aggregate.rs:324-353 | src/daft-ext-internal/src/function.rs:231-261 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) src/daft-recordbatch/src/ops/window_states/count_distinct.rs:41— src/daft-recordbatch/src/ops/window_states/count_distinct.rs:41-71 | src/daft-recordbatch/src/ops/window_states/count_distinct.rs:73-102 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×3
Edited copy of a member (28 corresponding lines) src/daft-csv/src/metadata.rs:78— src/daft-csv/src/metadata.rs:78-105 | src/daft-json/src/schema.rs:79-107 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) src/daft-logical-plan/src/scan_builder.rs:105— src/daft-logical-plan/src/scan_builder.rs:105-132 | src/daft-logical-plan/src/scan_builder.rs:247-276 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) daft/catalog/__init__.py:330— daft/catalog/__init__.py:330-360 | daft/catalog/__init__.py:368-395 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×3
Edited copies of one member (3 members, 18+ corresponding lines) src/daft-local-execution/src/sinks/aggregate.rs:110— src/daft-local-execution/src/sinks/aggregate.rs:110-127 | src/daft-local-execution/src/sinks/sort.rs:84-101 | src/daft-local-execution/src/sinks/top_n.rs:123-145 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) src/daft-distributed/src/pipeline_node/explode.rs:176— src/daft-distributed/src/pipeline_node/explode.rs:176-194 | src/daft-distributed/src/pipeline_node/project.rs:84-101 | src/daft-distributed/src/pipeline_node/udf.rs:219-240 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) src/daft-csv/src/python.rs:27— src/daft-csv/src/python.rs:27-47 | src/daft-json/src/python.rs:30-50 | src/daft-parquet/src/python.rs:333-350 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 15+ corresponding lines) · ×3
Edited copies of one member (4 members, 15+ corresponding lines) src/daft-logical-plan/src/ops/agg.rs:98— src/daft-logical-plan/src/ops/agg.rs:98-118 | src/daft-logical-plan/src/ops/explode.rs:105-119 | src/daft-logical-plan/src/ops/pivot.rs:93-111 | src/daft-logical-plan/src/ops/unpivot.rs:119-134 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 15+ corresponding lines) src/daft-micropartition/src/python.rs:373— src/daft-micropartition/src/python.rs:373-388 | src/daft-micropartition/src/python.rs:405-420 | src/daft-micropartition/src/python.rs:429-444 | src/daft-micropartition/src/python.rs:478-492 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 15+ corresponding lines) src/daft-micropartition/src/python.rs:568— src/daft-micropartition/src/python.rs:568-583 | src/daft-micropartition/src/python.rs:618-632 | src/daft-recordbatch/src/python.rs:326-341 | src/daft-recordbatch/src/python.rs:376-390 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×3
Edited copies of one member (3 members, 10+ corresponding lines) src/daft-distributed/src/pipeline_node/sink.rs:100— src/daft-distributed/src/pipeline_node/sink.rs:100-111 | src/daft-distributed/src/pipeline_node/stage_checkpoint_keys.rs:112-122 | src/daft-distributed/src/statistics/stats.rs:302-311 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:323— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:323-338 | src/daft-distributed/src/pipeline_node/join/cross_join.rs:154-163 | src/daft-distributed/src/pipeline_node/join/key_filtering_join.rs:352-367 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) src/daft-sql/src/modules/image/encode.rs:39— src/daft-sql/src/modules/image/encode.rs:39-48 | src/daft-sql/src/modules/image/resize.rs:56-66 | src/daft-sql/src/modules/image/to_mode.rs:34-43 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×3
Edited copies of one member (5 members, 11+ corresponding lines) src/common/metrics/src/snapshot.rs:149— src/common/metrics/src/snapshot.rs:149-159 | src/common/metrics/src/snapshot.rs:211-221 | src/common/metrics/src/snapshot.rs:353-364 | src/common/metrics/src/snapshot.rs:412-423 | src/common/metrics/src/snapshot.rs:469-479 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 11+ corresponding lines) src/daft-file/src/functions.rs:619— src/daft-file/src/functions.rs:619-631 | src/daft-functions-list/src/seq.rs:41-56 | src/daft-functions/src/numeric/bin.rs:35-45 | src/daft-functions/src/numeric/conv.rs:46-56 | src/daft-functions/src/numeric/factorial.rs:35-45 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 11+ corresponding lines) daft/session.py:320— daft/session.py:320-330 | daft/session.py:333-343 | daft/session.py:453-467 | daft/session.py:470-488 | daft/session.py:622-632 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×3
Edited copies of one member (3 members, 8+ corresponding lines) src/daft-functions-temporal/src/date_arithmetic.rs:53— src/daft-functions-temporal/src/date_arithmetic.rs:53-60 | src/daft-functions-temporal/src/date_arithmetic.rs:105-112 | src/daft-functions-temporal/src/date_arithmetic.rs:157-169 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) src/daft-catalog/src/python/wrappers.rs:59— src/daft-catalog/src/python/wrappers.rs:59-66 | src/daft-catalog/src/python/wrappers.rs:78-85 | src/daft-catalog/src/python/wrappers.rs:148-155 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) src/daft-functions-list/src/count_distinct.rs:35— src/daft-functions-list/src/count_distinct.rs:35-42 | src/daft-functions-tokenize/src/decode.rs:60-68 | src/daft-functions-tokenize/src/encode.rs:70-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×3
Edited copies of one member (4 members, 8+ corresponding lines) src/daft-writers/src/csv_writer.rs:56— src/daft-writers/src/csv_writer.rs:56-63 | src/daft-writers/src/csv_writer.rs:72-80 | src/daft-writers/src/json_writer.rs:31-38 | src/daft-writers/src/json_writer.rs:47-55 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) src/daft-logical-plan/src/builder/mod.rs:442— src/daft-logical-plan/src/builder/mod.rs:442-449 | src/daft-logical-plan/src/builder/mod.rs:489-502 | src/daft-logical-plan/src/builder/mod.rs:540-548 | src/daft-logical-plan/src/builder/mod.rs:554-565 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) src/daft-local-execution/src/intermediate_ops/project.rs:204— src/daft-local-execution/src/intermediate_ops/project.rs:204-211 | src/daft-local-execution/src/sinks/dedup.rs:178-185 | src/daft-logical-plan/src/partitioning.rs:137-145 | src/daft-logical-plan/src/partitioning.rs:397-405 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (33 lines × 2) src/daft-dsl/src/functions/python/mod.rs:120— src/daft-dsl/src/functions/python/mod.rs:120-152 | src/daft-dsl/src/functions/python/mod.rs:165-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/functions/python/mod.rs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (33 lines × 2) src/daft-image/src/ops.rs:347— src/daft-image/src/ops.rs:347-379 | src/daft-image/src/ops.rs:383-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `arr` to `&ImageArray` in one and `&FixedShapeImageArray` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (33 lines × 2) benchmarking/vllm/continuous-batch-sorted.py:20— benchmarking/vllm/continuous-batch-sorted.py:20-52 | benchmarking/vllm/continuous-batch.py:19-51 — before extracting anything, compare `benchmarking/vllm/continuous-batch-sorted.py` and `benchmarking/vllm/continuous-batch.py` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `benchmarking/vllm/continuous-batch-sorted.py:19` calls `sort` and `benchmarking/vllm/continuous-batch.py:18` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (27 lines × 2) src/daft-functions-list/src/kernels.rs:240— src/daft-functions-list/src/kernels.rs:240-266 | src/daft-functions-list/src/kernels.rs:306-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:240` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (27 lines × 2) src/daft-local-execution/src/intermediate_ops/udf.rs:126— src/daft-local-execution/src/intermediate_ops/udf.rs:126-152 | src/daft-local-execution/src/streaming_sink/async_udf.rs:118-144 — before extracting anything, compare `src/daft-local-execution/src/intermediate_ops/udf.rs` and `src/daft-local-execution/src/streaming_sink/async_udf.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (27 lines × 2) src/daft-recordbatch/src/lib.rs:1207— src/daft-recordbatch/src/lib.rs:1207-1233 | src/daft-recordbatch/src/lib.rs:1538-1564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:1207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26 lines × 2) src/daft-functions/src/similarity/bitwise_hamming.rs:92— src/daft-functions/src/similarity/bitwise_hamming.rs:92-117 | src/daft-functions/src/similarity/bitwise_hamming.rs:137-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/similarity/bitwise_hamming.rs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) src/daft-recordbatch/src/lib.rs:1240— src/daft-recordbatch/src/lib.rs:1240-1265 | src/daft-recordbatch/src/lib.rs:1571-1596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:1240` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26 lines × 2) src/daft-sql/src/modules/temporal.rs:656— src/daft-sql/src/modules/temporal.rs:656-681 | src/daft-sql/src/modules/temporal.rs:721-746 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/temporal.rs:656` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15–17 lines × 2) src/daft-dashboard/src/state.rs:375— src/daft-dashboard/src/state.rs:375-389 | src/daft-dashboard/src/state.rs:487-503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–17 lines × 2) src/daft-local-execution/src/join/outer_join.rs:224— src/daft-local-execution/src/join/outer_join.rs:224-238 | src/daft-local-execution/src/join/outer_join.rs:264-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/outer_join.rs:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) src/daft-scan/src/python/wrappers.rs:205— src/daft-scan/src/python/wrappers.rs:205-221 | src/daft-scan/src/python/wrappers.rs:379-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/python/wrappers.rs:205` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–16 lines × 2) src/daft-core/src/series/from_lit.rs:130— src/daft-core/src/series/from_lit.rs:130-145 | src/daft-core/src/series/from_lit.rs:150-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/from_lit.rs:130` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–16 lines × 2) src/daft-distributed/src/pipeline_node/into_batches.rs:147— src/daft-distributed/src/pipeline_node/into_batches.rs:147-162 | src/daft-distributed/src/pipeline_node/into_batches.rs:171-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–16 lines × 2) src/daft-logical-plan/src/ops/udf.rs:51— src/daft-logical-plan/src/ops/udf.rs:51-64 | src/daft-logical-plan/src/ops/window.rs:96-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/udf.rs:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) src/daft-distributed/src/pipeline_node/sink.rs:311— src/daft-distributed/src/pipeline_node/sink.rs:311-321 | src/daft-logical-plan/src/ops/sink.rs:109-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/sink.rs:311` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) src/daft-io/src/azure_blob.rs:548— src/daft-io/src/azure_blob.rs:548-557 | src/daft-io/src/azure_blob.rs:809-819 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/azure_blob.rs:548` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–11 lines × 2) src/daft-sql/src/modules/partitioning.rs:41— src/daft-sql/src/modules/partitioning.rs:41-50 | src/daft-sql/src/modules/partitioning.rs:68-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/partitioning.rs:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) src/daft-local-execution/src/sinks/sort.rs:85— src/daft-local-execution/src/sinks/sort.rs:85-94 | src/daft-local-execution/src/sinks/top_n.rs:124-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/sort.rs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) src/daft-logical-plan/src/ops/project.rs:398— src/daft-logical-plan/src/ops/project.rs:398-406 | src/daft-logical-plan/src/ops/project.rs:433-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/project.rs:398` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) src/daft-recordbatch/src/lib.rs:913— src/daft-recordbatch/src/lib.rs:913-922 | src/daft-recordbatch/src/lib.rs:1316-1324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:913` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) src/daft-local-plan/src/agg.rs:166— src/daft-local-plan/src/agg.rs:166-173 | src/daft-local-plan/src/agg.rs:178-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) src/daft-micropartition/src/micropartition.rs:724— src/daft-micropartition/src/micropartition.rs:724-732 | src/daft-parquet/src/read.rs:548-555 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-micropartition/src/micropartition.rs:724` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) src/daft-recordbatch/src/lib.rs:1856— src/daft-recordbatch/src/lib.rs:1856-1863 | src/daft-schema/src/schema.rs:303-311 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:1856` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
daft_local_plan::translate::translate_helper (cyclomatic 50) src/daft-local-plan/src/translate.rs:29— daft_local_plan::translate::translate_helper has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_local_plan::agg::populate_aggregation_stages_bound_with_schema (cyclomatic 31) src/daft-local-plan/src/agg.rs:28— daft_local_plan::agg::populate_aggregation_stages_bound_with_schema has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DataType::fmt (cyclomatic 49) src/daft-schema/src/dtype.rs:155— DataType::fmt has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DataType::estimate_size_bytes (cyclomatic 26) src/daft-schema/src/dtype.rs:783— DataType::estimate_size_bytes has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: DataType::try_from (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
daft_logical_plan::ops::project::replace_column_with_semantic_id (cyclomatic 41) src/daft-logical-plan/src/ops/project.rs:268— daft_logical_plan::ops::project::replace_column_with_semantic_id has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_logical_plan::ops::project::replace_column_with_semantic_id_aggexpr (cyclomatic 32) src/daft-logical-plan/src/ops/project.rs:549— daft_logical_plan::ops::project::replace_column_with_semantic_id_aggexpr has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DataArray::cast (cyclomatic 31) src/daft-core/src/array/ops/cast.rs:72— DataArray::cast has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataArray::clip (cyclomatic 18) src/daft-core/src/array/ops/clip.rs:26— DataArray::clip has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_recordbatch::ops::inline_agg::try_create_accumulator (cyclomatic 29) src/daft-recordbatch/src/ops/inline_agg.rs:598— daft_recordbatch::ops::inline_agg::try_create_accumulator has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: AggAccumulator::init_groups (cyclomatic 41) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
daft_recordbatch::ops::joins::merge_join::merge_inner_join (cyclomatic 26) src/daft-recordbatch/src/ops/joins/merge_join.rs:43— daft_recordbatch::ops::joins::merge_join::merge_inner_join has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Error::from (cyclomatic 27) src/daft-io/src/s3_like.rs:235— Error::from has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Error::from (cyclomatic 17) src/daft-io/src/google_cloud.rs:65— Error::from has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_writers::csv_writer::make_csv_writer::transform_batch (cyclomatic 25) src/daft-writers/src/csv_writer.rs:202— daft_writers::csv_writer::make_csv_writer::transform_batch has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_writers::json_writer::make_json_writer::transform_batch (cyclomatic 18) src/daft-writers/src/json_writer.rs:157— daft_writers::json_writer::make_json_writer::transform_batch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_json::inference::coerce_data_type (cyclomatic 22) src/daft-json/src/inference.rs:119— daft_json::inference::coerce_data_type has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
daft_json::decoding::deserialize_datetime_into (cyclomatic 16) src/daft-json/src/decoding.rs:380— daft_json::decoding::deserialize_datetime_into has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: daft_json::decoding::deserialize_into (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
daft_dashboard::engine::apply_query_end (cyclomatic 20) src/daft-dashboard/src/engine.rs:623— daft_dashboard::engine::apply_query_end has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_dashboard::engine::apply_exec_emit_stats (cyclomatic 16) src/daft-dashboard/src/engine.rs:414— daft_dashboard::engine::apply_exec_emit_stats has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
GooseFSConfig::to_opendal_config (cyclomatic 17) src/common/io-config/src/goosefs.rs:163— GooseFSConfig::to_opendal_config has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GooseFSConfig::multiline_display (cyclomatic 16) src/common/io-config/src/goosefs.rs:97— GooseFSConfig::multiline_display has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FixmeComment src/daft-dsl/src/functions/python/mod.rs:263— // FIXME(zhenchao) Perhaps the layout should be optimized to improve readability — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment src/daft-dsl/src/expr/mod.rs:2289— // FIXME: make struct its own expr variant — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
GlobScanOperator::try_new (cognitive 100) src/daft-scan/src/glob.rs:153— GlobScanOperator::try_new has cognitive complexity 100 (threshold 15). Drivers by points: match/switch 13 (40 pts), if/else 17 (35 pts), loops 6 (21 pts), boolean chains 4 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobScanOperator::to_scan_tasks (cognitive 17) src/daft-scan/src/glob.rs:658— GlobScanOperator::to_scan_tasks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RuntimeStatsManager::new_impl (cognitive 62) src/daft-local-execution/src/runtime_stats/mod.rs:374— RuntimeStatsManager::new_impl has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 6 (18 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeStatsManager::handle_message (cognitive 18) src/daft-local-execution/src/runtime_stats/mod.rs:210— RuntimeStatsManager::handle_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_writers::csv_writer::make_csv_writer::transform_batch (cognitive 55) src/daft-writers/src/csv_writer.rs:202— daft_writers::csv_writer::make_csv_writer::transform_batch has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 4 (14 pts), loops 3 (9 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_writers::json_writer::make_json_writer::transform_batch (cognitive 51) src/daft-writers/src/json_writer.rs:157— daft_writers::json_writer::make_json_writer::transform_batch has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 3 (9 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataArray::cast (cognitive 48) src/daft-core/src/array/ops/cast.rs:72— DataArray::cast has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 13, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataArray::clip (cognitive 17) src/daft-core/src/array/ops/clip.rs:26— DataArray::clip has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (16 pts), boolean chains 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JoinAdjList::get_connections (cognitive 48) src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:367— JoinAdjList::get_connections has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (37 pts), loops 4 (11 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
JoinAdjList::add_join_condition (cognitive 23) src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:198— JoinAdjList::add_join_condition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_dashboard::engine::apply_query_end (cognitive 44) src/daft-dashboard/src/engine.rs:623— daft_dashboard::engine::apply_query_end has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 3 (8 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_dashboard::engine::apply_exec_emit_stats (cognitive 32) src/daft-dashboard/src/engine.rs:414— daft_dashboard::engine::apply_exec_emit_stats has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 3 (10 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JoinGraphBuilder::process_linear_chain (cognitive 44) src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:841— JoinGraphBuilder::process_linear_chain has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 7 (14 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JoinGraphBuilder::add_relation (cognitive 18) src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:970— JoinGraphBuilder::add_relation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Error::from (cognitive 36) src/daft-io/src/s3_like.rs:235— Error::from has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 8 (17 pts), boolean chains 1 (nesting depth added 16). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Error::from (cognitive 17) src/daft-io/src/google_cloud.rs:65— Error::from has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 3 (4 pts) (nesting depth added 8). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
McapReader::new (cognitive 32) src/daft-mcap/src/read.rs:192— McapReader::new has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 3 (7 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
McapReader::next_message (cognitive 21) src/daft-mcap/src/read.rs:419— McapReader::next_message has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LogicalPlan::get_schema_for_alias (cognitive 26) src/daft-logical-plan/src/logical_plan.rs:929— LogicalPlan::get_schema_for_alias has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LogicalPlan::get_schema_for_id (cognitive 16) src/daft-logical-plan/src/logical_plan.rs:992— LogicalPlan::get_schema_for_id has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_sql::schema::sql_dtype_to_dtype (cognitive 25) src/daft-sql/src/schema.rs:78— daft_sql::schema::sql_dtype_to_dtype has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 10 (21 pts), if/else 1 (4 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_sql::exec::execute_create_table (cognitive 18) src/daft-sql/src/exec.rs:56— daft_sql::exec::execute_create_table has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×2
Edited copy of a member (54 corresponding lines) src/daft-local-plan/src/plan.rs:1178— src/daft-local-plan/src/plan.rs:1178-1231 | src/daft-local-plan/src/plan.rs:1262-1318 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) src/daft-scan/src/python/wrappers.rs:181— src/daft-scan/src/python/wrappers.rs:181-244 | src/daft-scan/src/python/wrappers.rs:372-425 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (73 corresponding lines) · ×2
Edited copy of a member (73 corresponding lines) src/daft-algebra/src/simplify/boolean.rs:82— src/daft-algebra/src/simplify/boolean.rs:82-154 | src/daft-algebra/src/simplify/boolean.rs:176-248 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (73 corresponding lines) src/daft-json/src/local.rs:125— src/daft-json/src/local.rs:125-208 | src/daft-json/src/local.rs:329-401 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) src/daft-core/src/datatypes/infer_datatype.rs:384— src/daft-core/src/datatypes/infer_datatype.rs:384-424 | src/daft-core/src/datatypes/infer_datatype.rs:430-470 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) daft/dataframe/dataframe.py:6212— daft/dataframe/dataframe.py:6212-6252 | daft/dataframe/dataframe.py:6309-6351 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×2
Edited copy of a member (46 corresponding lines) src/daft-functions/src/similarity/bitwise_hamming.rs:86— src/daft-functions/src/similarity/bitwise_hamming.rs:86-131 | src/daft-functions/src/similarity/bitwise_hamming.rs:133-181 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (46 corresponding lines) src/daft-sql/src/modules/temporal.rs:651— src/daft-sql/src/modules/temporal.rs:651-696 | src/daft-sql/src/modules/temporal.rs:716-761 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) src/daft-core/src/array/ops/arithmetic.rs:245— src/daft-core/src/array/ops/arithmetic.rs:245-277 | src/daft-core/src/array/ops/arithmetic.rs:285-317 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) src/daft-distributed/src/scheduling/task.rs:412— src/daft-distributed/src/scheduling/task.rs:412-448 | src/daft-distributed/src/scheduling/task.rs:461-493 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) src/daft-sql/src/modules/temporal.rs:83— src/daft-sql/src/modules/temporal.rs:83-140 | src/daft-sql/src/modules/temporal.rs:159-196 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) src/daft-functions-uri/src/download.rs:59— src/daft-functions-uri/src/download.rs:59-96 | src/daft-functions-uri/src/upload.rs:51-89 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 23+ corresponding lines) · ×2
Edited copies of one member (3 members, 23+ corresponding lines) src/common/io-config/src/python.rs:1736— src/common/io-config/src/python.rs:1736-1763 | src/common/io-config/src/python.rs:1954-1976 | src/common/io-config/src/python.rs:2229-2254 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 23+ corresponding lines) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:533— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:533-563 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:569-591 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:635-657 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×2
Edited copies of one member (3 members, 27+ corresponding lines) src/daft-local-execution/src/sinks/window_order_by_only.rs:181— src/daft-local-execution/src/sinks/window_order_by_only.rs:181-207 | src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:251-297 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:265-299 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 27+ corresponding lines) src/daft-functions-list/src/append.rs:44— src/daft-functions-list/src/append.rs:44-70 | src/daft-functions-list/src/contains.rs:50-77 | src/daft-functions-list/src/join.rs:43-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×2
Edited copies of one member (3 members, 17+ corresponding lines) src/daft-core/src/array/serdes.rs:138— src/daft-core/src/array/serdes.rs:138-154 | src/daft-core/src/array/serdes.rs:161-181 | src/daft-core/src/array/serdes.rs:188-206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) src/daft-micropartition/src/ops/partition.rs:41— src/daft-micropartition/src/ops/partition.rs:41-57 | src/daft-micropartition/src/ops/partition.rs:59-76 | src/daft-micropartition/src/ops/partition.rs:83-100 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) src/daft-functions-utf8/src/chr.rs:58— src/daft-functions-utf8/src/chr.rs:58-71 | src/daft-functions-utf8/src/space.rs:57-70 | src/daft-functions-utf8/src/utils.rs:215-229 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) src/daft-dsl/src/functions/partitioning/evaluators.rs:101— src/daft-dsl/src/functions/partitioning/evaluators.rs:101-114 | src/daft-dsl/src/functions/partitioning/evaluators.rs:148-161 | src/daft-dsl/src/functions/struct_/get.rs:59-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×2
Edited copies of one member (4 members, 11+ corresponding lines) src/daft-sql/src/modules/temporal.rs:458— src/daft-sql/src/modules/temporal.rs:458-471 | src/daft-sql/src/modules/temporal.rs:489-499 | src/daft-sql/src/modules/temporal.rs:517-527 | src/daft-sql/src/modules/temporal.rs:545-555 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 11+ corresponding lines) src/daft-functions-list/src/series.rs:57— src/daft-functions-list/src/series.rs:57-68 | src/daft-functions-list/src/series.rs:70-81 | src/daft-functions-list/src/series.rs:208-223 | src/daft-functions-list/src/series.rs:376-386 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) src/daft-parquet/src/statistics/utils.rs:18— src/daft-parquet/src/statistics/utils.rs:18-28 | src/daft-parquet/src/statistics/utils.rs:31-41 | src/daft-parquet/src/statistics/utils.rs:44-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) src/daft-dsl/src/expr/display.rs:29— src/daft-dsl/src/expr/display.rs:29-40 | src/daft-dsl/src/functions/mod.rs:90-100 | src/daft-dsl/src/functions/mod.rs:105-116 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 13+ corresponding lines) · ×2
Edited copies of one member (5 members, 13+ corresponding lines) src/daft-ext/src/abi/arrow.rs:67— src/daft-ext/src/abi/arrow.rs:67-79 | src/daft-ext/src/abi/arrow.rs:86-98 | src/daft-ext/src/abi/arrow.rs:105-117 | src/daft-ext/src/abi/arrow.rs:125-138 | src/daft-ext/src/abi/arrow.rs:146-159 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 13+ corresponding lines) src/daft-ext/src/abi/arrow.rs:214— src/daft-ext/src/abi/arrow.rs:214-226 | src/daft-ext/src/abi/arrow.rs:233-245 | src/daft-ext/src/abi/arrow.rs:252-264 | src/daft-ext/src/abi/arrow.rs:272-285 | src/daft-ext/src/abi/arrow.rs:293-306 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Duplicated block (31 lines × 2) src/daft-io/src/http.rs:173— src/daft-io/src/http.rs:173-203 | src/daft-io/src/http.rs:220-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/http.rs:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `source` to `reqwest_middleware::reqwest::Error` in one and `reqwest_middleware::Error` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (31 lines × 2) benchmarking/tpch/answers.py:616— benchmarking/tpch/answers.py:616-646 | benchmarking/tpch/answers_sql.py:33-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (30 lines × 2) src/daft-local-execution/src/intermediate_ops/project.rs:226— src/daft-local-execution/src/intermediate_ops/project.rs:226-255 | src/daft-local-execution/src/intermediate_ops/udf.rs:573-602 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (30 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:62— src/daft-local-execution/src/join/left_right_join.rs:62-91 | src/daft-local-execution/src/join/left_right_join.rs:142-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/left_right_join.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26–27 lines × 2) src/daft-csv/src/read.rs:385— src/daft-csv/src/read.rs:385-411 | src/daft-json/src/read.rs:212-237 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (26–27 lines × 2) src/daft-recordbatch/src/lib.rs:1044— src/daft-recordbatch/src/lib.rs:1044-1070 | src/daft-recordbatch/src/lib.rs:1391-1416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:1044` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (25–26 lines × 2) src/daft-logical-plan/src/ops/limit.rs:56— src/daft-logical-plan/src/ops/limit.rs:56-80 | src/daft-logical-plan/src/ops/top_n.rs:98-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (25–26 lines × 2) src/daft-writers/src/pyarrow.rs:142— src/daft-writers/src/pyarrow.rs:142-167 | src/daft-writers/src/pyarrow.rs:184-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-writers/src/pyarrow.rs:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) src/daft-algebra/src/simplify/boolean.rs:120— src/daft-algebra/src/simplify/boolean.rs:120-144 | src/daft-algebra/src/simplify/boolean.rs:214-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-algebra/src/simplify/boolean.rs:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) src/daft-csv/src/read.rs:518— src/daft-csv/src/read.rs:518-542 | src/daft-json/src/read.rs:382-406 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:518` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) src/daft-functions-list/src/kernels.rs:408— src/daft-functions-list/src/kernels.rs:408-427 | src/daft-functions-list/src/kernels.rs:785-803 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/kernels.rs:408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:116— src/daft-local-execution/src/join/left_right_join.rs:116-135 | src/daft-local-execution/src/join/outer_join.rs:98-116 — before extracting anything, compare `src/daft-local-execution/src/join/left_right_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/left_right_join.rs:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-local-execution/src/join/outer_join.rs:97` calls `mark_used` and `src/daft-local-execution/src/join/left_right_join.rs:115` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–17 lines × 2) src/daft-io/src/http.rs:272— src/daft-io/src/http.rs:272-288 | src/daft-io/src/huggingface/mod.rs:120-133 — before extracting anything, compare `src/daft-io/src/http.rs` and `src/daft-io/src/huggingface/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14–17 lines × 2) src/daft-scan/src/expr_rewriter.rs:196— src/daft-scan/src/expr_rewriter.rs:196-212 | src/daft-scan/src/expr_rewriter.rs:234-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/expr_rewriter.rs:196` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–16 lines × 2) src/daft-io/src/object_store_glob.rs:473— src/daft-io/src/object_store_glob.rs:473-488 | src/daft-io/src/object_store_glob.rs:614-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/object_store_glob.rs:473` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–16 lines × 2) src/daft-local-execution/src/intermediate_ops/udf.rs:520— src/daft-local-execution/src/intermediate_ops/udf.rs:520-535 | src/daft-local-execution/src/streaming_sink/async_udf.rs:351-363 — before extracting anything, compare `src/daft-local-execution/src/intermediate_ops/udf.rs` and `src/daft-local-execution/src/streaming_sink/async_udf.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/intermediate_ops/udf.rs:520` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) src/daft-local-execution/src/pipeline.rs:650— src/daft-local-execution/src/pipeline.rs:650-662 | src/daft-local-execution/src/pipeline.rs:731-744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/pipeline.rs:650` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) src/daft-recordbatch/src/lib.rs:954— src/daft-recordbatch/src/lib.rs:954-967 | src/daft-recordbatch/src/lib.rs:1339-1351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:954` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 4) src/daft-file/src/functions.rs:123— src/daft-file/src/functions.rs:123-135 | src/daft-file/src/functions.rs:217-229 | src/daft-file/src/functions.rs:310-321 | src/daft-file/src/functions.rs:402-413 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-file/src/functions.rs:123` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12–13 lines × 4) src/daft-functions-utf8/src/regexp_extract.rs:86— src/daft-functions-utf8/src/regexp_extract.rs:86-97 | src/daft-functions-utf8/src/repeat.rs:88-100 | src/daft-functions-utf8/src/replace.rs:132-143 | src/daft-functions-utf8/src/translate.rs:83-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (12–13 lines × 3) src/daft-writers/src/avro_writer.rs:150— src/daft-writers/src/avro_writer.rs:150-162 | src/daft-writers/src/batch_file_writer.rs:120-131 | src/daft-writers/src/parquet_writer.rs:445-456 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-writers/src/avro_writer.rs:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 3) daft/recordbatch/recordbatch_io.py:318— daft/recordbatch/recordbatch_io.py:318-329 | daft/recordbatch/recordbatch_io.py:390-402 | daft/recordbatch/recordbatch_io.py:451-462 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `daft/recordbatch/recordbatch_io.py:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) src/daft-distributed/src/scheduling/scheduler/default.rs:122— src/daft-distributed/src/scheduling/scheduler/default.rs:122-132 | src/daft-distributed/src/scheduling/scheduler/linear.rs:111-123 — before extracting anything, compare `src/daft-distributed/src/scheduling/scheduler/default.rs` and `src/daft-distributed/src/scheduling/scheduler/linear.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/scheduling/scheduler/default.rs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) src/daft-local-execution/src/join/inner_join.rs:73— src/daft-local-execution/src/join/inner_join.rs:73-85 | src/daft-local-execution/src/join/outer_join.rs:147-157 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/inner_join.rs:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) src/daft-sql/src/modules/config.rs:126— src/daft-sql/src/modules/config.rs:126-137 | src/daft-sql/src/modules/config.rs:210-221 | src/daft-sql/src/modules/config.rs:287-298 | src/daft-sql/src/modules/config.rs:422-433 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/config.rs:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) src/daft-writers/src/pyarrow.rs:31— src/daft-writers/src/pyarrow.rs:31-42 | src/daft-writers/src/pyarrow.rs:88-99 | src/daft-writers/src/pyarrow.rs:138-149 | src/daft-writers/src/pyarrow.rs:180-191 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15–16 lines × 2) src/daft-csv/src/read.rs:121— src/daft-csv/src/read.rs:121-136 | src/daft-csv/src/read.rs:412-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15–16 lines × 2) src/daft-local-plan/src/agg.rs:206— src/daft-local-plan/src/agg.rs:206-220 | src/daft-local-plan/src/agg.rs:241-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–10 lines × 2) src/daft-io/src/multipart.rs:45— src/daft-io/src/multipart.rs:45-54 | src/daft-io/src/multipart.rs:84-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/multipart.rs:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–10 lines × 2) src/daft-sql/src/modules/temporal.rs:218— src/daft-sql/src/modules/temporal.rs:218-227 | src/daft-sql/src/modules/temporal.rs:1023-1028 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/temporal.rs:218` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7–9 lines × 2) src/daft-io/src/http.rs:390— src/daft-io/src/http.rs:390-396 | src/daft-io/src/huggingface/mod.rs:267-275 — before extracting anything, compare `src/daft-io/src/http.rs` and `src/daft-io/src/huggingface/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/http.rs:390` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–9 lines × 2) src/daft-local-execution/src/join/inner_join.rs:24— src/daft-local-execution/src/join/inner_join.rs:24-30 | src/daft-local-execution/src/join/left_right_join.rs:31-39 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/left_right_join.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/inner_join.rs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-local-execution/src/join/left_right_join.rs:40` calls `mark_used` and `src/daft-local-execution/src/join/inner_join.rs:31` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 5) src/daft-local-execution/src/intermediate_ops/explode.rs:36— src/daft-local-execution/src/intermediate_ops/explode.rs:36-44 | src/daft-local-execution/src/intermediate_ops/filter.rs:46-54 | src/daft-local-execution/src/intermediate_ops/stage_checkpoint_keys.rs:43-50 | src/daft-local-execution/src/intermediate_ops/udf.rs:62-70 | src/daft-local-execution/src/runtime_stats/values.rs:58-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/intermediate_ops/explode.rs:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-local-execution/src/intermediate_ops/filter.rs:55` calls `f64_gauge` and `src/daft-local-execution/src/intermediate_ops/explode.rs:45` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 5) src/daft-core/src/array/ops/compare_agg.rs:26— src/daft-core/src/array/ops/compare_agg.rs:26-33 | src/daft-core/src/array/ops/compare_agg.rs:108-115 | src/daft-core/src/array/ops/compare_agg.rs:167-174 | src/daft-core/src/array/ops/compare_agg.rs:230-237 | src/daft-core/src/array/ops/compare_agg.rs:299-306 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/compare_agg.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) src/daft-functions/src/numeric/exp.rs:37— src/daft-functions/src/numeric/exp.rs:37-43 | src/daft-functions/src/numeric/trigonometry.rs:40-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/numeric/exp.rs:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) src/daft-mcap/src/lib.rs:146— src/daft-mcap/src/lib.rs:146-153 | src/daft-mcap/src/lib.rs:209-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-mcap/src/lib.rs:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 4) src/daft-local-execution/src/join/left_right_join.rs:207— src/daft-local-execution/src/join/left_right_join.rs:207-213 | src/daft-local-execution/src/join/left_right_join.rs:255-261 | src/daft-local-execution/src/join/outer_join.rs:222-228 | src/daft-local-execution/src/join/outer_join.rs:262-268 — before extracting anything, compare `src/daft-local-execution/src/join/left_right_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/outer_join.rs:262` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-local-execution/src/join/left_right_join.rs:204` calls `get_columns_by_name` and `src/daft-local-execution/src/join/outer_join.rs:261` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 4) src/daft-sql/src/modules/temporal.rs:164— src/daft-sql/src/modules/temporal.rs:164-170 | src/daft-sql/src/modules/temporal.rs:822-828 | src/daft-sql/src/modules/temporal.rs:938-944 | src/daft-sql/src/modules/temporal.rs:980-986 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-sql/src/modules/temporal.rs:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 2) src/daft-ext-internal/src/aggregate.rs:102— src/daft-ext-internal/src/aggregate.rs:102-107 | src/daft-ext-internal/src/function.rs:152-158 — before extracting anything, compare `src/daft-ext-internal/src/aggregate.rs` and `src/daft-ext-internal/src/function.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6–7 lines × 2) src/daft-sql/src/modules/image/decode.rs:17— src/daft-sql/src/modules/image/decode.rs:17-22 | src/daft-sql/src/modules/image/to_mode.rs:16-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 5) src/daft-csv/src/read.rs:395— src/daft-csv/src/read.rs:395-401 | src/daft-csv/src/read.rs:509-514 | src/daft-json/src/read.rs:222-227 | src/daft-json/src/read.rs:373-378 | src/daft-warc/src/lib.rs:577-581 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) src/daft-functions-list/src/max.rs:26— src/daft-functions-list/src/max.rs:26-30 | src/daft-functions-list/src/mean.rs:27-31 | src/daft-functions-list/src/min.rs:23-27 | src/daft-functions-list/src/sum.rs:27-31 | src/daft-functions-list/src/value_counts.rs:24-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-list/src/max.rs:26` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) src/daft-local-execution/src/join/inner_join.rs:26— src/daft-local-execution/src/join/inner_join.rs:26-30 | src/daft-local-execution/src/join/left_right_join.rs:34-39 | src/daft-local-execution/src/join/left_right_join.rs:111-115 | src/daft-local-execution/src/join/outer_join.rs:91-96 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/left_right_join.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/inner_join.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-local-execution/src/join/left_right_join.rs:40` calls `mark_used` and `src/daft-local-execution/src/join/inner_join.rs:31` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 4) src/daft-functions-utf8/src/replace.rs:95— src/daft-functions-utf8/src/replace.rs:95-99 | src/daft-functions-utf8/src/split_part.rs:68-72 | src/daft-functions-utf8/src/substring_index.rs:66-70 | src/daft-functions-utf8/src/translate.rs:53-57 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/replace.rs:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Outbound HTTP without resilience daft/catalog/__gravitino/_client.py:112— `requests.Session(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:112— `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Duplicated block (18 lines × 2 locations) src/daft-dashboard/frontend/src/app/queries/status.tsx:73— src/daft-dashboard/frontend/src/app/queries/status.tsx:73 · src/daft-dashboard/frontend/src/app/queries/status.tsx:106 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (18 lines × 2 locations) src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:505— src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:505 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:599 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 2 locations) src/daft-dashboard/frontend/src/components/server-provider.tsx:78— src/daft-dashboard/frontend/src/components/server-provider.tsx:78 · src/daft-dashboard/frontend/src/components/server-provider.tsx:96 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 2 locations) src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:107— src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:107 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:130 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
AXR1 · Runtime accessibility (rendered)· WCAG 1.1.1 reproducibly failed in a rendered surface · ×1
WCAG 1.1.1 reproducibly failed in a rendered surface — axe-core rule(s) image-alt failed on: img[height="30"]. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 1.4.3 reproducibly failed in a rendered surface · ×1
WCAG 1.4.3 reproducibly failed in a rendered surface — axe-core rule(s) color-contrast failed on: #mantine-jga0j14nw-title, #rc-tabs-0-tab-searchForm, .ant-form-item.css-#:nth-child(1) > .ant-form-item-row.ant-row.css-# > .ant-form-item-label.ant-col.css-# > label[title=""] > span > .SearchForm--labelCount, .ant-form-item.css-#:nth-child(2) > .ant-form-item-row.ant-row.css-# > .ant-form-item-label.ant-col.css-# > label[title=""] > span > .SearchForm--labelCount, .cm-placeholder. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 2.4.2 reproducibly failed in a rendered surface · ×1
WCAG 2.4.2 reproducibly failed in a rendered surface — axe-core rule(s) document-title failed on: html. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 3.1.1 reproducibly failed in a rendered surface · ×1
WCAG 3.1.1 reproducibly failed in a rendered surface — axe-core rule(s) html-has-lang, html-lang-valid failed on: html. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 4.1.2 reproducibly failed in a rendered surface · ×1
WCAG 4.1.2 reproducibly failed in a rendered surface — axe-core rule(s) aria-allowed-attr, aria-command-name, aria-conditional-attr, aria-deprecated-role, aria-hidden-body, aria-hidden-focus, aria-input-field-name, aria-prohibited-attr, aria-required-attr, aria-roles, aria-valid-attr, aria-valid-attr-value, button-name, duplicate-id-aria, label, link-name, nested-interactive failed on: #rc_select_0, #rc_select_1, #rc_select_2, .cm-content. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
daft_local_execution::pipeline::physical_plan_to_pipeline (cyclomatic 81) src/daft-local-execution/src/pipeline.rs:436— daft_local_execution::pipeline::physical_plan_to_pipeline has cyclomatic complexity 81 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DataType.infer_from_type (cyclomatic 64) daft/datatype.py:183— DataType.infer_from_type has cyclomatic complexity 64 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_sql::schema::sql_dtype_to_dtype (cyclomatic 56) src/daft-sql/src/schema.rs:78— daft_sql::schema::sql_dtype_to_dtype has cyclomatic complexity 56 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PushDownProjection::try_optimize_project (cyclomatic 46) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:28— PushDownProjection::try_optimize_project has cyclomatic complexity 46 (threshold 15). Of this number, 45 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GlobScanOperator::try_new (cyclomatic 46) src/daft-scan/src/glob.rs:153— GlobScanOperator::try_new has cyclomatic complexity 46 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
daft_scan::expr_rewriter::rewrite_predicate_for_partitioning (cyclomatic 44) src/daft-scan/src/expr_rewriter.rs:84— daft_scan::expr_rewriter::rewrite_predicate_for_partitioning has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
page.QueryPageInner (cyclomatic 44) REDACTED:64— page.QueryPageInner has cyclomatic complexity 44 (threshold 15). Of this number, 37 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DataType.from_arrow_type (cyclomatic 42) daft/datatype.py:733— DataType.from_arrow_type has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PushDownFilter::try_optimize_node (cyclomatic 41) src/daft-logical-plan/src/optimization/rules/push_down_filter.rs:44— PushDownFilter::try_optimize_node has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PyDaftExecutionConfig::with_config_values (cyclomatic 40) src/common/daft-config/src/python.rs:127— PyDaftExecutionConfig::with_config_values has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DataFrame.write_iceberg (cyclomatic 40) daft/dataframe/dataframe.py:1403— DataFrame.write_iceberg has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DataFrame.write_deltalake (cyclomatic 40) daft/dataframe/dataframe.py:1893— DataFrame.write_deltalake has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VideoFile._frames (cyclomatic 39) daft/file/video.py:171— VideoFile._frames has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
__postgres._daft_dtype_to_postgres_type (cyclomatic 37) daft/catalog/__postgres.py:76— __postgres._daft_dtype_to_postgres_type has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_decoding::deserialize::deserialize_bytes_to_array (cyclomatic 36) src/daft-decoding/src/deserialize.rs:277— daft_decoding::deserialize::deserialize_bytes_to_array has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LogicalPlanToPipelineNodeTranslator::f_up (cyclomatic 35) src/daft-distributed/src/pipeline_node/translate.rs:128— LogicalPlanToPipelineNodeTranslator::f_up has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AggExpr::to_field (cyclomatic 33) src/daft-dsl/src/expr/mod.rs:838— AggExpr::to_field has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Expr::semantic_id (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
PushDownLimit::try_optimize_node (cyclomatic 33) src/daft-logical-plan/src/optimization/rules/push_down_limit.rs:45— PushDownLimit::try_optimize_node has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LogicalPlan::required_columns (cyclomatic 31) src/daft-logical-plan/src/logical_plan.rs:196— LogicalPlan::required_columns has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: LogicalPlan::with_new_children (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
DeltaLakeDataSource._get_scan_tasks (cyclomatic 30) REDACTED:333— DeltaLakeDataSource._get_scan_tasks has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataFrame.write_lance (cyclomatic 27) daft/dataframe/dataframe.py:2424— DataFrame.write_lance has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_colab_compat.clean_pydantic_model (cyclomatic 26) daft/functions/ai/_colab_compat.py:28— _colab_compat.clean_pydantic_model has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
S3Config::multiline_display (cyclomatic 25) src/common/io-config/src/s3.rs:146— S3Config::multiline_display has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
physical-plan-tree.PhysicalNodeCard (cyclomatic 25) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:115— physical-plan-tree.PhysicalNodeCard has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InferDataType::add (cyclomatic 24) src/daft-core/src/datatypes/infer_datatype.rs:221— InferDataType::add has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: daft_core::datatypes::infer_datatype::try_numeric_supertype::inner (cyclomatic 67) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
PushDownAntiSemiJoin::try_optimize (cyclomatic 23) src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:108— PushDownAntiSemiJoin::try_optimize has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WarcRecordBatchIterator::read_chunk (cyclomatic 23) src/daft-warc/src/lib.rs:302— WarcRecordBatchIterator::read_chunk has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KafkaSourceTask.read (cyclomatic 23) daft/io/_kafka.py:434— KafkaSourceTask.read has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_kafka._normalize_bound (cyclomatic 23) daft/io/_kafka.py:70— _kafka._normalize_bound has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuntimeStatsManager::new_impl (cyclomatic 22) src/daft-local-execution/src/runtime_stats/mod.rs:374— RuntimeStatsManager::new_impl has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tasks-sidebar.TasksSidebar (cyclomatic 22) src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:41— tasks-sidebar.TasksSidebar has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IOClient::get_source_and_path (cyclomatic 21) src/daft-io/src/lib.rs:226— IOClient::get_source_and_path has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RayRunner.run_iter (cyclomatic 21) daft/runners/ray_runner.py:577— RayRunner.run_iter has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_file::file::guess_mimetype_from_content (cyclomatic 20) src/daft-file/src/file.rs:437— daft_file::file::guess_mimetype_from_content has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScanTaskSource::spawn_scan_task_processor (cyclomatic 20) src/daft-local-execution/src/sources/scan_task.rs:72— ScanTaskSource::spawn_scan_task_processor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JoinGraphBuilder::process_linear_chain (cyclomatic 20) src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs:841— JoinGraphBuilder::process_linear_chain has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataFrame.skip_existing (cyclomatic 20) daft/dataframe/dataframe.py:3394— DataFrame.skip_existing has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KafkaSource.get_tasks (cyclomatic 20) daft/io/_kafka.py:313— KafkaSource.get_tasks has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeltaLakeDataSource.__init__ (cyclomatic 20) REDACTED:149— DeltaLakeDataSource.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProbeExecutionContext::process_probe_input (cyclomatic 19) src/daft-local-execution/src/join/probe.rs:208— ProbeExecutionContext::process_probe_input has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
filesystem._build_filesystem (cyclomatic 19) daft/filesystem.py:200— filesystem._build_filesystem has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PaimonDataSource.get_tasks (cyclomatic 19) daft/io/paimon/paimon_scan.py:134— PaimonDataSource.get_tasks has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
physical-plan-tree.PhysicalPlanTree (cyclomatic 19) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:278— physical-plan-tree.PhysicalPlanTree has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RayWorkerManager::retire_idle_workers (cyclomatic 18) src/daft-distributed/src/python/ray/worker_manager.rs:304— RayWorkerManager::retire_idle_workers has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_functions_serde::format::json::coerce_json_value (cyclomatic 18) src/daft-functions-serde/src/format/json.rs:92— daft_functions_serde::format::json::coerce_json_value has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SplitGranularProjection::try_optimize_node (cyclomatic 18) src/daft-logical-plan/src/optimization/rules/granular_projections.rs:53— SplitGranularProjection::try_optimize_node has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
McapReader::new (cyclomatic 18) src/daft-mcap/src/read.rs:192— McapReader::new has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_algebra::simplify::boolean::simplify_binary_compare (cyclomatic 18) src/daft-algebra/src/simplify/boolean.rs:251— daft_algebra::simplify::boolean::simplify_binary_compare has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
_client._io_config_from_storage_location (cyclomatic 18) daft/catalog/__gravitino/_client.py:397— _client._io_config_from_storage_location has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UdfHandle.eval_input (cyclomatic 18) daft/execution/udf.py:134— UdfHandle.eval_input has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
flotilla.start_ray_workers (cyclomatic 18) daft/runners/flotilla.py:430— flotilla.start_ray_workers has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Image::deserialize (cyclomatic 17) src/common/image/src/image.rs:157— Image::deserialize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StructArray::cast (cyclomatic 17) src/daft-core/src/array/ops/cast.rs:1747— StructArray::cast has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AzureBlobSource::list_directory_delimiter_stream (cyclomatic 17) src/daft-io/src/azure_blob.rs:703— AzureBlobSource::list_directory_delimiter_stream has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Window::multiline_display (cyclomatic 17) src/daft-logical-plan/src/ops/window.rs:132— Window::multiline_display has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DataFrame.join_asof (cyclomatic 17) daft/dataframe/dataframe.py:4125— DataFrame.join_asof has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VideoFile.get_frame_by_idx (cyclomatic 17) daft/file/video.py:290— VideoFile.get_frame_by_idx has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_VideoFramesSourceTask._list_frames (cyclomatic 17) daft/io/av/_read_video_frames.py:136— _VideoFramesSourceTask._list_frames has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IOConfig::multiline_display_for_backends (cyclomatic 16) src/common/io-config/src/config.rs:120— IOConfig::multiline_display_for_backends has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daft_csv::read::read_csv_single_into_table (cyclomatic 16) src/daft-csv/src/read.rs:292— daft_csv::read::read_csv_single_into_table has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
daft_parquet::statistics::column_range::parquet_statistics_to_column_range_statistics (cyclomatic 16) src/daft-parquet/src/statistics/column_range.rs:89— daft_parquet::statistics::column_range::parquet_statistics_to_column_range_statistics has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
__main__.validate_query_results (cyclomatic 16) benchmarking/tpcds/__main__.py:136— __main__.validate_query_results has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataFrame.join (cyclomatic 16) daft/dataframe/dataframe.py:4030— DataFrame.join has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lerobot._decode_one_shard (cyclomatic 16) daft/datasets/lerobot.py:58— lerobot._decode_one_shard has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HudiDataSource.get_tasks (cyclomatic 16) daft/io/hudi/hudi_scan.py:45— HudiDataSource.get_tasks has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PushDownFilter::try_optimize_node (cognitive 89) src/daft-logical-plan/src/optimization/rules/push_down_filter.rs:44— PushDownFilter::try_optimize_node has cognitive complexity 89 (threshold 15). Drivers by points: if/else 33 (73 pts), match/switch 4 (7 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 45). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KafkaSourceTask.read (cognitive 64) daft/io/_kafka.py:434— KafkaSourceTask.read has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.write_deltalake (cognitive 59) daft/dataframe/dataframe.py:1893— DataFrame.write_deltalake has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 11, loops 4 (8 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideoFile._frames (cognitive 57) daft/file/video.py:171— VideoFile._frames has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 10, ternaries 7 (9 pts), loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushDownProjection::try_optimize_project (cognitive 56) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:28— PushDownProjection::try_optimize_project has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (44 pts), boolean chains 6, match/switch 3 (4 pts), loops 1 (2 pts) (nesting depth added 22). Of this number, 53 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.write_iceberg (cognitive 55) daft/dataframe/dataframe.py:1403— DataFrame.write_iceberg has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (24 pts), loops 7 (12 pts), ternaries 6 (10 pts), boolean chains 9 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DataType.infer_from_type (cognitive 55) daft/datatype.py:183— DataType.infer_from_type has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (45 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeltaLakeDataSource._get_scan_tasks (cognitive 55) REDACTED:333— DeltaLakeDataSource._get_scan_tasks has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 4 (12 pts), boolean chains 8, loops 3 (7 pts), ternaries 3 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScanTaskSource::spawn_scan_task_processor (cognitive 52) src/daft-local-execution/src/sources/scan_task.rs:72— ScanTaskSource::spawn_scan_task_processor has cognitive complexity 52 (threshold 15). Drivers by points: if/else 8 (28 pts), match/switch 5 (15 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WarcRecordBatchIterator::read_chunk (cognitive 51) src/daft-warc/src/lib.rs:302— WarcRecordBatchIterator::read_chunk has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (38 pts), match/switch 2 (6 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushDownAntiSemiJoin::try_optimize (cognitive 50) src/daft-logical-plan/src/optimization/rules/push_down_anti_semi_join.rs:108— PushDownAntiSemiJoin::try_optimize has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (32 pts), match/switch 5 (16 pts), boolean chains 2 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
_kafka._normalize_bound (cognitive 50) daft/io/_kafka.py:70— _kafka._normalize_bound has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 3 (10 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushDownLimit::try_optimize_node (cognitive 46) src/daft-logical-plan/src/optimization/rules/push_down_limit.rs:45— PushDownLimit::try_optimize_node has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 6 (16 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
_colab_compat.clean_pydantic_model (cognitive 45) daft/functions/ai/_colab_compat.py:28— _colab_compat.clean_pydantic_model has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 5 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
page.QueryPageInner (cognitive 44) REDACTED:64— page.QueryPageInner has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 14, if/else 8 (9 pts), loops 1 (nesting depth added 6). Of this number, 35 points are the body's own statements and 9 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PyDaftExecutionConfig::with_config_values (cognitive 42) src/common/daft-config/src/python.rs:127— PyDaftExecutionConfig::with_config_values has cognitive complexity 42 (threshold 15). Drivers by points: if/else 37 (40 pts), match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
KafkaSource.get_tasks (cognitive 42) daft/io/_kafka.py:313— KafkaSource.get_tasks has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (34 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SplitGranularProjection::try_optimize_node (cognitive 40) src/daft-logical-plan/src/optimization/rules/granular_projections.rs:53— SplitGranularProjection::try_optimize_node has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 6 (12 pts), match/switch 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProbeExecutionContext::process_probe_input (cognitive 38) src/daft-local-execution/src/join/probe.rs:208— ProbeExecutionContext::process_probe_input has cognitive complexity 38 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 5 (15 pts), loops 3 (7 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lerobot._decode_one_shard (cognitive 35) daft/datasets/lerobot.py:58— lerobot._decode_one_shard has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RayRunner.run_iter (cognitive 35) daft/runners/ray_runner.py:577— RayRunner.run_iter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
daft_local_plan::translate::translate_helper (cognitive 34) src/daft-local-plan/src/translate.rs:29— daft_local_plan::translate::translate_helper has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 7 (16 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PaimonDataSource.get_tasks (cognitive 34) daft/io/paimon/paimon_scan.py:134— PaimonDataSource.get_tasks has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flotilla.start_ray_workers (cognitive 34) daft/runners/flotilla.py:430— flotilla.start_ray_workers has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (6 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeltaLakeDataSource.__init__ (cognitive 33) REDACTED:149— DeltaLakeDataSource.__init__ has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LogicalPlanBuilder::select (cognitive 32) src/daft-logical-plan/src/builder/mod.rs:256— LogicalPlanBuilder::select has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (7 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filesystem._build_filesystem (cognitive 31) daft/filesystem.py:200— filesystem._build_filesystem has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VLLMSink::pop_and_submit_tasks (cognitive 30) src/daft-local-execution/src/streaming_sink/vllm.rs:215— VLLMSink::pop_and_submit_tasks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostgresTable.schema (cognitive 30) daft/catalog/__postgres.py:487— PostgresTable.schema has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 2 (7 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.write_lance (cognitive 30) daft/dataframe/dataframe.py:2424— DataFrame.write_lance has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13, error handling 5 (8 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_VideoFramesSourceTask._list_frames (cognitive 30) daft/io/av/_read_video_frames.py:136— _VideoFramesSourceTask._list_frames has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (6 pts), boolean chains 2, error handling 1 (2 pts), ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AggExpr::to_field (cognitive 29) src/daft-dsl/src/expr/mod.rs:838— AggExpr::to_field has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 5 (9 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AsofJoinProbeState::probe_batch (cognitive 29) src/daft-local-execution/src/join/asof_join.rs:321— AsofJoinProbeState::probe_batch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rust_lockfile_diff.main (cognitive 28) .github/ci-scripts/rust_lockfile_diff.py:34— rust_lockfile_diff.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (12 pts), ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UdfHandle.eval_input (cognitive 28) daft/execution/udf.py:134— UdfHandle.eval_input has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushDownAggregation::try_optimize (cognitive 27) src/daft-logical-plan/src/optimization/rules/push_down_aggregation.rs:26— PushDownAggregation::try_optimize has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 2 (7 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HudiDataSource.get_tasks (cognitive 27) daft/io/hudi/hudi_scan.py:45— HudiDataSource.get_tasks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RayWorkerManager::retire_idle_workers (cognitive 26) src/daft-distributed/src/python/ray/worker_manager.rs:304— RayWorkerManager::retire_idle_workers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Dispatcher::await_completed_tasks (cognitive 26) src/daft-distributed/src/scheduling/dispatcher.rs:74— Dispatcher::await_completed_tasks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (15 pts), match/switch 2 (7 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
__main__.validate_query_results (cognitive 26) benchmarking/tpcds/__main__.py:136— __main__.validate_query_results has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 3, boolean chains 1, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobScanSource::spawn_glob_path_processor (cognitive 25) src/daft-local-execution/src/sources/glob_scan.rs:51— GlobScanSource::spawn_glob_path_processor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (6 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataType::fmt (cognitive 25) src/daft-schema/src/dtype.rs:155— DataType::fmt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
gen_function_pages.format_function_signature (cognitive 25) docs/gen_pages/gen_function_pages.py:74— gen_function_pages.format_function_signature has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3Config::multiline_display (cognitive 24) src/common/io-config/src/s3.rs:146— S3Config::multiline_display has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RowWisePyFn::call_serial (cognitive 24) src/daft-dsl/src/python_udf/row_wise.rs:309— RowWisePyFn::call_serial has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (5 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlockingSinkNode::run (cognitive 24) src/daft-local-execution/src/sinks/blocking_sink.rs:300— BlockingSinkNode::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (7 pts), match/switch 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tasks-sidebar.TasksSidebar (cognitive 24) src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:41— tasks-sidebar.TasksSidebar has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 11 (nesting depth added 5). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_display::table_display::build_table (cognitive 23) src/common/display/src/table_display.rs:115— common_display::table_display::build_table has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushDownJoinPredicate::try_optimize (cognitive 23) src/daft-logical-plan/src/optimization/rules/push_down_join_predicate.rs:31— PushDownJoinPredicate::try_optimize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.join_asof (cognitive 23) daft/dataframe/dataframe.py:4125— DataFrame.join_asof has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_webdataset._iter_archive_samples (cognitive 23) daft/io/webdataset/_webdataset.py:146— _webdataset._iter_archive_samples has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowSpec::fmt (cognitive 22) src/daft-dsl/src/expr/window.rs:171— WindowSpec::fmt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShuffleReadSource::spawn_flight_shuffle_processor (cognitive 22) src/daft-local-execution/src/sources/shuffle_read.rs:119— ShuffleReadSource::spawn_flight_shuffle_processor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 2 (9 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilterNullJoinKey::try_optimize (cognitive 22) src/daft-logical-plan/src/optimization/rules/filter_null_join_key.rs:95— FilterNullJoinKey::try_optimize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SplitExplodeFromProject::try_optimize (cognitive 22) src/daft-logical-plan/src/optimization/rules/split_explode_from_project.rs:21— SplitExplodeFromProject::try_optimize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api_annotations.type_check_function (cognitive 22) daft/api_annotations.py:66— api_annotations.type_check_function has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
delta_lake_write.get_file_stats_from_metadata (cognitive 22) daft/io/delta_lake/delta_lake_write.py:68— delta_lake_write.get_file_stats_from_metadata has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
physical-plan-tree.PhysicalNodeCard (cognitive 22) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:115— physical-plan-tree.PhysicalNodeCard has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (8 pts), if/else 3 (nesting depth added 3). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SchedulerLoop::run (cognitive 21) src/daft-distributed/src/scheduling/scheduler/scheduler_actor.rs:102— SchedulerLoop::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Join::deduplicate_join_columns (cognitive 21) src/daft-logical-plan/src/ops/join.rs:245— Join::deduplicate_join_columns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Project::factor_expressions (cognitive 21) src/daft-logical-plan/src/ops/project.rs:163— Project::factor_expressions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BruteForceJoinOrderer::find_min_cost_order (cognitive 21) src/daft-logical-plan/src/optimization/rules/reorder_joins/brute_force_join_order.rs:16— BruteForceJoinOrderer::find_min_cost_order has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnyValueAccumI8::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumI8::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, AnyValueAccumI64::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumI16::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumI16::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI32::update_batch, AnyValueAccumI64::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumI32::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumI32::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI64::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumI64::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumI64::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumU8::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumU8::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumU16::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumU16::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumU32::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumU32::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumU64::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumU64::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumF32::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumF32::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnyValueAccumF64::update_batch (cognitive 21) src/daft-recordbatch/src/ops/inline_agg.rs:403— AnyValueAccumF64::update_batch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (AnyValueAccumI8::update_batch, AnyValueAccumI16::update_batch, AnyValueAccumI32::update_batch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ScanTask::estimate_in_memory_size_bytes (cognitive 21) src/daft-scan/src/lib.rs:727— ScanTask::estimate_in_memory_size_bytes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_client._io_config_from_storage_location (cognitive 21) daft/catalog/__gravitino/_client.py:397— _client._io_config_from_storage_location has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 10 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.explain (cognitive 21) daft/dataframe/dataframe.py:315— DataFrame.explain has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.skip_existing (cognitive 21) daft/dataframe/dataframe.py:3394— DataFrame.skip_existing has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 3, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
_kafka._resolve_bound (cognitive 21) daft/io/_kafka.py:193— _kafka._resolve_bound has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate_llms_txt.get_doc_structure (cognitive 21) docs/gen_pages/generate_llms_txt.py:8— generate_llms_txt.get_doc_structure has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnionArray::from_arrow (cognitive 20) src/daft-core/src/array/ops/from_arrow.rs:175— UnionArray::from_arrow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ScanSourceNode::multiline_display (cognitive 20) src/daft-distributed/src/pipeline_node/scan_source.rs:178— ScanSourceNode::multiline_display has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Expr::to_field (cognitive 20) src/daft-dsl/src/expr/mod.rs:2038— Expr::to_field has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 3 (6 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
daft_file::file::guess_mimetype_from_content (cognitive 20) src/daft-file/src/file.rs:437— daft_file::file::guess_mimetype_from_content has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
data_generation.gen_csv_files (cognitive 20) benchmarking/tpch/data_generation.py:245— data_generation.gen_csv_files has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 3 (4 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
__postgres._daft_dtype_to_postgres_type (cognitive 20) daft/catalog/__postgres.py:76— __postgres._daft_dtype_to_postgres_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame._write_deltalake_with_checkpoint (cognitive 20) daft/dataframe/dataframe.py:2206— DataFrame._write_deltalake_with_checkpoint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_paimon._convert_paimon_catalog_options_to_io_config (cognitive 20) daft/io/paimon/_paimon.py:32— _paimon._convert_paimon_catalog_options_to_io_config has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GooseFSConfig::to_opendal_config (cognitive 19) src/common/io-config/src/goosefs.rs:163— GooseFSConfig::to_opendal_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (19 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
common_tracing::init_tracing (cognitive 19) src/common/tracing/src/lib.rs:51— common_tracing::init_tracing has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChunkyIterator::next (cognitive 19) src/daft-csv/src/local.rs:443— ChunkyIterator::next has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LogicalPlanToPipelineNodeTranslator::f_up (cognitive 19) src/daft-distributed/src/pipeline_node/translate.rs:128— LogicalPlanToPipelineNodeTranslator::f_up has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (8 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IOClient::get_source_and_path (cognitive 19) src/daft-io/src/lib.rs:226— IOClient::get_source_and_path has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 4 (5 pts), loops 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CountDistinctWindowState::remove (cognitive 19) src/daft-recordbatch/src/ops/window_states/count_distinct.rs:73— CountDistinctWindowState::remove has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.__getitem__ (cognitive 19) daft/dataframe/dataframe.py:2857— DataFrame.__getitem__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideoFile.get_frame_by_idx (cognitive 19) daft/file/video.py:290— VideoFile.get_frame_by_idx has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FsFileMetadata._extract_min_max (cognitive 19) daft/io/hudi/pyhudi/utils.py:41— FsFileMetadata._extract_min_max has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IcebergDataSource._create_regular_tasks (cognitive 19) daft/io/iceberg/iceberg_scan.py:298— IcebergDataSource._create_regular_tasks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TurbopufferDataSink.__init__ (cognitive 19) daft/io/turbopuffer/turbopuffer_data_sink.py:54— TurbopufferDataSink.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ray_runner._series_from_arrow_with_ray_data_extensions (cognitive 19) daft/runners/ray_runner.py:195— ray_runner._series_from_arrow_with_ray_data_extensions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.__getitem__ (cognitive 19) daft/series.py:285— Series.__getitem__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metrics.increment_counter (cognitive 19) daft/udf/metrics.py:19— metrics.increment_counter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stats-utils.getEffectiveStatus (cognitive 19) src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:53— stats-utils.getEffectiveStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GCSSource::get_client_config (cognitive 18) src/daft-io/src/google_cloud.rs:494— GCSSource::get_client_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnnestPredicateSubquery::try_optimize (cognitive 18) src/daft-logical-plan/src/optimization/rules/unnest_subquery.rs:281— UnnestPredicateSubquery::try_optimize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (6 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BoolAndAccum::update_batch (cognitive 18) src/daft-recordbatch/src/ops/inline_agg.rs:268— BoolAndAccum::update_batch has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 2 (7 pts), if/else 3 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BoolOrAccum::update_batch (cognitive 18) src/daft-recordbatch/src/ops/inline_agg.rs:331— BoolOrAccum::update_batch has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 2 (7 pts), if/else 3 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFrame.join (cognitive 18) daft/dataframe/dataframe.py:4030— DataFrame.join has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrefixRouter.route (cognitive 18) daft/execution/vllm.py:274— PrefixRouter.route has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_orc._resolve_orc_paths (cognitive 18) daft/io/_orc.py:42— _orc._resolve_orc_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
physical-plan-tree.PhysicalPlanTree (cognitive 18) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:278— physical-plan-tree.PhysicalPlanTree has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 5, if/else 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MermaidDisplayVisitor::fmt (cognitive 17) src/common/display/src/mermaid.rs:172— MermaidDisplayVisitor::fmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daft_distributed::pipeline_node::materialize::materialize_all_pipeline_outputs (cognitive 17) src/daft-distributed/src/pipeline_node/materialize.rs:17— daft_distributed::pipeline_node::materialize::materialize_all_pipeline_outputs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), loops 2 (nesting depth added 10). None of this is in the body itself: all 17 points belong to 2 function items inside it that branch (task_materializer, task_finalizer). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
daft_image::ops::colorhash (cognitive 17) src/daft-image/src/ops.rs:839— daft_image::ops::colorhash has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsofJoinOperator::finalize_probe (cognitive 17) src/daft-local-execution/src/join/asof_join.rs:839— AsofJoinOperator::finalize_probe has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 4 (6 pts), match/switch 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
__postgres.postgres_connection (cognitive 17) daft/catalog/__postgres.py:29— __postgres.postgres_connection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (6 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataType.from_arrow_type (cognitive 17) daft/datatype.py:733— DataType.from_arrow_type has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SQLDataSink._normalize_non_primitive_values (cognitive 17) daft/io/_sql.py:224— SQLDataSink._normalize_non_primitive_values has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
object_store_options._s3_config_to_storage_options (cognitive 17) daft/io/object_store_options.py:39— object_store_options._s3_config_to_storage_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PaimonDataSink.write (cognitive 17) daft/io/paimon/paimon_data_sink.py:58— PaimonDataSink.write has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cloudpickle._find_imported_submodules (cognitive 17) REDACTED:337— cloudpickle._find_imported_submodules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_macros::function_args::get_attrs (cognitive 16) src/common/macros/src/function_args.rs:255— common_macros::function_args::get_attrs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreShuffleMergeNode::execute_merge (cognitive 16) src/daft-distributed/src/pipeline_node/shuffles/pre_shuffle_merge.rs:104— PreShuffleMergeNode::execute_merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UDFProperties::multiline_display (cognitive 16) src/daft-dsl/src/functions/python/mod.rs:230— UDFProperties::multiline_display has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HFSource::request (cognitive 16) src/daft-io/src/huggingface/mod.rs:185— HFSource::request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3LikeSource::ls (cognitive 16) src/daft-io/src/s3_like.rs:1420— S3LikeSource::ls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EliminateCrossJoin::try_optimize (cognitive 16) src/daft-logical-plan/src/optimization/rules/eliminate_cross_join.rs:49— EliminateCrossJoin::try_optimize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
lerobot._format_path_template (cognitive 16) daft/datasets/lerobot.py:231— lerobot._format_path_template has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
udf_worker.udf_event_loop (cognitive 16) REDACTED:26— udf_worker.udf_event_loop has cognitive complexity 16 (threshold 15). Drivers by points: error handling 6 (10 pts), if/else 3 (5 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai.prompt (cognitive 16) daft/functions/ai/__init__.py:453— ai.prompt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SQLScanOperator._get_partition_bounds (cognitive 16) daft/sql/sql_scan.py:198— SQLScanOperator._get_partition_bounds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: DaftExecutionConfig src/common/daft-config/src/lib.rs:120— TooManyFields — 34 stored fields beside 1 method. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Near-duplicate member family (4 members, 23 shared lines) · ×1
Near-duplicate member family (4 members, 23 shared lines) src/daft-file/src/functions.rs:95— src/daft-file/src/functions.rs:95-158 | src/daft-file/src/functions.rs:189-252 | src/daft-file/src/functions.rs:283-344 | src/daft-file/src/functions.rs:375-436 — These 4 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 20 shared lines) · ×1
Near-duplicate member family (4 members, 20 shared lines) src/daft-local-execution/src/join/inner_join.rs:14— src/daft-local-execution/src/join/inner_join.rs:14-85 | src/daft-local-execution/src/join/left_right_join.rs:20-91 | src/daft-local-execution/src/join/left_right_join.rs:97-171 | src/daft-local-execution/src/join/outer_join.rs:62-157 — These 4 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member pair (133 shared lines) src/daft-recordbatch/src/lib.rs:886— src/daft-recordbatch/src/lib.rs:886-1279 | src/daft-recordbatch/src/lib.rs:1298-1610 — These two members are variants of one another: 133 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (55 shared lines) src/daft-recordbatch/src/ops/inline_agg.rs:950— src/daft-recordbatch/src/ops/inline_agg.rs:950-1021 | src/daft-recordbatch/src/ops/inline_agg.rs:1040-1112 — These two members are variants of one another: 55 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (48 shared lines) src/daft-functions-utf8/src/split_part.rs:99— src/daft-functions-utf8/src/split_part.rs:99-164 | src/daft-functions-utf8/src/substring_index.rs:97-160 — These two members are variants of one another: 48 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (40 shared lines) src/daft-io/src/gravitino.rs:97— src/daft-io/src/gravitino.rs:97-144 | src/daft-io/src/unity.rs:77-124 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (35 shared lines) src/daft-csv/src/read.rs:178— src/daft-csv/src/read.rs:178-253 | src/daft-parquet/src/read.rs:186-238 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (30 shared lines) src/daft-logical-plan/src/ops/set_operations.rs:179— src/daft-logical-plan/src/ops/set_operations.rs:179-249 | src/daft-logical-plan/src/ops/set_operations.rs:486-535 — These two members are variants of one another: 30 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (77 corresponding lines) · ×1
Edited copy of a member (77 corresponding lines) src/daft-functions-temporal/src/date_construction.rs:117— src/daft-functions-temporal/src/date_construction.rs:117-198 | src/daft-functions-temporal/src/date_construction.rs:284-365 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) src/daft-functions-temporal/src/date_construction.rs:204— src/daft-functions-temporal/src/date_construction.rs:204-254 | src/daft-functions-temporal/src/date_construction.rs:371-421 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) src/daft-local-plan/src/plan.rs:158— src/daft-local-plan/src/plan.rs:158-208 | src/daft-local-plan/src/plan.rs:211-259 | src/daft-local-plan/src/plan.rs:261-309 | src/daft-logical-plan/src/logical_plan.rs:435-471 | src/daft-logical-plan/src/logical_plan.rs:1033-1066 | src/daft-logical-plan/src/logical_plan.rs:1068-1101 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (175 corresponding lines) · ×1
Edited copy of a member (175 corresponding lines) src/daft-writers/src/csv_writer.rs:173— src/daft-writers/src/csv_writer.rs:173-405 | src/daft-writers/src/json_writer.rs:139-313 — These two members are one piece of code written twice and then edited apart: 175 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (83 corresponding lines) · ×1
Edited copy of a member (83 corresponding lines) src/daft-core/src/datatypes/infer_datatype.rs:566— src/daft-core/src/datatypes/infer_datatype.rs:566-660 | src/daft-core/src/datatypes/infer_datatype.rs:662-744 — These two members are one piece of code written twice and then edited apart: 83 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (92 corresponding lines) · ×1
Edited copy of a member (92 corresponding lines) src/daft-core/src/series/ops/arithmetic.rs:118— src/daft-core/src/series/ops/arithmetic.rs:118-237 | src/daft-core/src/series/ops/arithmetic.rs:242-333 — These two members are one piece of code written twice and then edited apart: 92 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (120 corresponding lines) · ×1
Edited copy of a member (120 corresponding lines) src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:122— src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:122-241 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:113-255 — These two members are one piece of code written twice and then edited apart: 120 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (71 corresponding lines) · ×1
Edited copy of a member (71 corresponding lines) src/daft-core/src/series/ops/agg.rs:40— src/daft-core/src/series/ops/agg.rs:40-110 | src/daft-core/src/series/ops/agg.rs:112-190 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (75 corresponding lines) · ×1
Edited copy of a member (75 corresponding lines) src/daft-ext-macros/src/types.rs:51— src/daft-ext-macros/src/types.rs:51-144 | src/daft-ext-macros/src/types.rs:219-293 — These two members are one piece of code written twice and then edited apart: 75 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) src/daft-functions-utf8/src/left.rs:80— src/daft-functions-utf8/src/left.rs:80-141 | src/daft-functions-utf8/src/right.rs:87-150 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) src/daft-distributed/src/pipeline_node/join/asof_join.rs:113— src/daft-distributed/src/pipeline_node/join/asof_join.rs:113-163 | src/daft-distributed/src/pipeline_node/join/sort_merge_join.rs:110-156 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) src/daft-functions-list/src/kernels.rs:463— src/daft-functions-list/src/kernels.rs:463-525 | src/daft-functions-list/src/kernels.rs:874-926 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) src/daft-core/src/kernels/search_sorted.rs:24— src/daft-core/src/kernels/search_sorted.rs:24-84 | src/daft-core/src/kernels/search_sorted.rs:146-216 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 47+ corresponding lines) · ×1
Edited copies of one member (3 members, 47+ corresponding lines) src/common/io-config/src/cos.rs:76— src/common/io-config/src/cos.rs:76-122 | src/common/io-config/src/goosefs.rs:97-156 | src/common/io-config/src/tos.rs:66-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) src/daft-csv/src/read.rs:86— src/daft-csv/src/read.rs:86-140 | src/daft-warc/src/lib.rs:435-486 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) src/daft-logical-plan/src/builder/mod.rs:1027— src/daft-logical-plan/src/builder/mod.rs:1027-1096 | src/daft-logical-plan/src/builder/mod.rs:1102-1168 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) daft/catalog/__gravitino/_client.py:228— daft/catalog/__gravitino/_client.py:228-307 | daft/catalog/__gravitino/_client.py:310-377 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) src/daft-logical-plan/src/optimization/rules/split_udfs.rs:246— src/daft-logical-plan/src/optimization/rules/split_udfs.rs:246-293 | src/daft-logical-plan/src/optimization/rules/split_udfs.rs:306-363 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) src/daft-sql/src/table_provider/read_csv.rs:21— src/daft-sql/src/table_provider/read_csv.rs:21-73 | src/daft-sql/src/table_provider/read_parquet.rs:22-70 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) daft/recordbatch/recordbatch_io.py:284— daft/recordbatch/recordbatch_io.py:284-341 | daft/recordbatch/recordbatch_io.py:353-414 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) src/daft-core/src/array/struct_array.rs:33— src/daft-core/src/array/struct_array.rs:33-95 | src/daft-core/src/array/union_array.rs:36-102 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) src/common/io-config/src/python.rs:1798— src/common/io-config/src/python.rs:1798-1826 | src/common/io-config/src/python.rs:2007-2030 | src/common/io-config/src/python.rs:2291-2315 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) src/daft-dsl/src/python.rs:210— src/daft-dsl/src/python.rs:210-252 | src/daft-dsl/src/python.rs:274-317 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) src/daft-dsl/src/python_udf/retry.rs:83— src/daft-dsl/src/python_udf/retry.rs:83-118 | src/daft-dsl/src/python_udf/retry.rs:128-171 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) src/daft-writers/src/csv_writer.rs:127— src/daft-writers/src/csv_writer.rs:127-166 | src/daft-writers/src/json_writer.rs:94-132 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 37+ corresponding lines) · ×1
Edited copies of one member (3 members, 37+ corresponding lines) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:49— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:49-85 | src/daft-distributed/src/pipeline_node/join/stats.rs:30-67 | src/daft-local-execution/src/join/stats.rs:52-89 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) src/daft-functions-utf8/src/replace.rs:91— src/daft-functions-utf8/src/replace.rs:91-107 | src/daft-functions-utf8/src/split_part.rs:64-79 | src/daft-functions-utf8/src/substring_index.rs:62-77 | src/daft-functions-utf8/src/translate.rs:49-64 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) src/daft-distributed/src/pipeline_node/window.rs:105— src/daft-distributed/src/pipeline_node/window.rs:105-124 | src/daft-distributed/src/pipeline_node/window.rs:156-181 | src/daft-distributed/src/pipeline_node/window.rs:207-226 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 28+ corresponding lines) · ×1
Edited copies of one member (3 members, 28+ corresponding lines) src/daft-distributed/src/pipeline_node/udf.rs:177— src/daft-distributed/src/pipeline_node/udf.rs:177-210 | src/daft-local-execution/src/intermediate_ops/udf.rs:494-535 | src/daft-local-execution/src/streaming_sink/async_udf.rs:336-363 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 53+ corresponding lines) · ×1
Edited copies of one member (3 members, 53+ corresponding lines) daft/io/_avro.py:33— daft/io/_avro.py:33-85 | daft/io/_csv.py:43-115 | daft/io/_json.py:36-89 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) src/daft-functions/src/numeric/pmod.rs:97— src/daft-functions/src/numeric/pmod.rs:97-113 | src/daft-functions/src/numeric/pmod.rs:115-124 | src/daft-functions/src/numeric/pmod.rs:126-137 | src/daft-functions/src/numeric/pmod.rs:139-150 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) src/daft-functions-utf8/src/left.rs:32— src/daft-functions-utf8/src/left.rs:32-49 | src/daft-functions-utf8/src/pad.rs:26-44 | src/daft-functions-utf8/src/repeat.rs:30-48 | src/daft-functions-utf8/src/right.rs:39-56 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) daft/recordbatch/micropartition.py:315— daft/recordbatch/micropartition.py:315-334 | daft/recordbatch/micropartition.py:344-361 | daft/recordbatch/recordbatch.py:342-355 | daft/recordbatch/recordbatch.py:365-385 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 69+ corresponding lines) · ×1
Edited copies of one member (4 members, 69+ corresponding lines) daft/functions/ai/__init__.py:80— daft/functions/ai/__init__.py:80-154 | daft/functions/ai/__init__.py:164-242 | daft/functions/ai/__init__.py:258-326 | daft/functions/ai/__init__.py:337-421 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 69 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 22+ corresponding lines) · ×1
Edited copies of one member (4 members, 22+ corresponding lines) src/daft-avro/src/python.rs:31— src/daft-avro/src/python.rs:31-55 | src/daft-csv/src/python.rs:63-87 | src/daft-json/src/python.rs:66-90 | src/daft-parquet/src/python.rs:304-325 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) src/daft-micropartition/src/ops/eval_expressions.rs:22— src/daft-micropartition/src/ops/eval_expressions.rs:22-42 | src/daft-micropartition/src/ops/eval_expressions.rs:43-64 | src/daft-micropartition/src/ops/eval_expressions.rs:70-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) src/daft-sql/src/modules/temporal.rs:360— src/daft-sql/src/modules/temporal.rs:360-374 | src/daft-sql/src/modules/temporal.rs:392-406 | src/daft-sql/src/modules/temporal.rs:424-438 | src/daft-sql/src/modules/temporal.rs:864-878 | src/daft-sql/src/modules/temporal.rs:897-911 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) src/daft-distributed/src/pipeline_node/into_partitions.rs:44— src/daft-distributed/src/pipeline_node/into_partitions.rs:44-67 | src/daft-distributed/src/pipeline_node/random_shuffle.rs:49-72 | src/daft-distributed/src/pipeline_node/shuffles/gather.rs:40-61 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) benchmarking/vllm/continuous-batch-sorted.py:14— benchmarking/vllm/continuous-batch-sorted.py:14-52 | benchmarking/vllm/naive-batch-sorted.py:37-61 | benchmarking/vllm/naive-batch.py:37-60 | benchmarking/vllm/prefix-bucketing.py:14-49 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) daft/dataframe/dataframe.py:620— daft/dataframe/dataframe.py:620-669 | daft/dataframe/dataframe.py:675-741 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 23+ corresponding lines) · ×1
Edited copies of one member (4 members, 23+ corresponding lines) src/daft-distributed/src/pipeline_node/concat.rs:31— src/daft-distributed/src/pipeline_node/concat.rs:31-56 | src/daft-distributed/src/pipeline_node/into_batches.rs:97-119 | src/daft-distributed/src/pipeline_node/join/asof_join.rs:78-105 | src/daft-distributed/src/pipeline_node/join/cross_join.rs:41-63 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 21+ corresponding lines) · ×1
Edited copies of one member (4 members, 21+ corresponding lines) src/daft-distributed/src/pipeline_node/filter.rs:115— src/daft-distributed/src/pipeline_node/filter.rs:115-135 | src/daft-distributed/src/pipeline_node/monotonically_increasing_id.rs:33-53 | src/daft-distributed/src/pipeline_node/shuffles/pre_shuffle_merge.rs:38-59 | src/daft-distributed/src/pipeline_node/stage_checkpoint_keys.rs:40-60 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 22+ corresponding lines) · ×1
Edited copies of one member (7 members, 22+ corresponding lines) src/daft-distributed/src/pipeline_node/aggregate.rs:70— src/daft-distributed/src/pipeline_node/aggregate.rs:70-93 | src/daft-distributed/src/pipeline_node/explode.rs:119-141 | src/daft-distributed/src/pipeline_node/pivot.rs:43-67 | src/daft-distributed/src/pipeline_node/sink.rs:175-197 | src/daft-distributed/src/pipeline_node/top_n.rs:42-66 | src/daft-distributed/src/pipeline_node/unpivot.rs:41-64 | src/daft-distributed/src/pipeline_node/vllm.rs:35-56 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) src/daft-recordbatch/src/python.rs:147— src/daft-recordbatch/src/python.rs:147-162 | src/daft-recordbatch/src/python.rs:171-187 | src/daft-recordbatch/src/python.rs:196-210 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 7+ corresponding lines) · ×1
Edited copies of one member (5 members, 7+ corresponding lines) src/daft-session/src/session.rs:616— src/daft-session/src/session.rs:616-622 | src/daft-session/src/session.rs:625-631 | src/daft-session/src/session.rs:634-640 | src/daft-session/src/session.rs:642-652 | src/daft-session/src/session.rs:654-663 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) src/daft-functions-list/src/max.rs:36— src/daft-functions-list/src/max.rs:36-42 | src/daft-functions-list/src/mean.rs:37-45 | src/daft-functions-list/src/min.rs:33-39 | src/daft-functions-list/src/sum.rs:37-44 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 10+ corresponding lines) · ×1
Edited copies of one member (7 members, 10+ corresponding lines) src/daft-functions-binary/src/decode.rs:95— src/daft-functions-binary/src/decode.rs:95-106 | src/daft-functions-binary/src/encode.rs:34-48 | src/daft-functions-binary/src/encode.rs:89-102 | src/daft-functions-temporal/src/date_navigation.rs:70-79 | src/daft-functions-temporal/src/date_navigation.rs:152-161 | src/daft-functions-temporal/src/to_string.rs:36-45 | src/daft-functions-temporal/src/unix_timestamp.rs:56-67 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×1
Edited copies of one member (5 members, 12+ corresponding lines) src/daft-distributed/src/pipeline_node/explode.rs:36— src/daft-distributed/src/pipeline_node/explode.rs:36-48 | src/daft-distributed/src/pipeline_node/filter.rs:36-48 | src/daft-distributed/src/pipeline_node/stage_checkpoint_keys.rs:75-91 | src/daft-distributed/src/pipeline_node/udf.rs:41-54 | src/daft-distributed/src/statistics/stats.rs:265-276 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) src/daft-micropartition/src/python.rs:304— src/daft-micropartition/src/python.rs:304-316 | src/daft-micropartition/src/python.rs:324-337 | src/daft-recordbatch/src/python.rs:83-95 | src/daft-recordbatch/src/python.rs:103-116 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) src/daft-sql/src/table_provider/read_csv.rs:81— src/daft-sql/src/table_provider/read_csv.rs:81-107 | src/daft-sql/src/table_provider/read_json.rs:18-36 | src/daft-sql/src/table_provider/read_parquet.rs:78-100 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (88 corresponding lines) · ×1
Edited copy of a member (88 corresponding lines) daft/udf/__init__.py:64— daft/udf/__init__.py:64-249 | daft/udf/__init__.py:265-352 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 5+ corresponding lines) · ×1
Edited copies of one member (5 members, 5+ corresponding lines) daft/recordbatch/micropartition.py:149— daft/recordbatch/micropartition.py:149-153 | daft/recordbatch/micropartition.py:395-404 | daft/recordbatch/recordbatch.py:156-160 | daft/recordbatch/recordbatch.py:412-418 | daft/series.py:254-259 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) src/daft-logical-plan/src/ops/project.rs:99— src/daft-logical-plan/src/ops/project.rs:99-108 | src/daft-logical-plan/src/ops/shard.rs:56-67 | src/daft-logical-plan/src/ops/vllm.rs:59-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 12+ corresponding lines) · ×1
Edited copies of one member (6 members, 12+ corresponding lines) src/daft-local-execution/src/sinks/dedup.rs:105— src/daft-local-execution/src/sinks/dedup.rs:105-116 | src/daft-local-execution/src/sinks/grouped_aggregate.rs:333-345 | src/daft-local-execution/src/sinks/window_order_by_only.rs:84-95 | src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:103-115 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:94-106 | src/daft-local-execution/src/sinks/window_partition_only.rs:80-92 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 8+ corresponding lines) · ×1
Edited copies of one member (5 members, 8+ corresponding lines) src/common/io-config/src/azure.rs:94— src/common/io-config/src/azure.rs:94-101 | src/common/io-config/src/config.rs:205-212 | src/common/io-config/src/http.rs:61-68 | src/common/io-config/src/huggingface.rs:70-77 | src/common/io-config/src/s3.rs:272-279 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Duplicated block (102 lines × 2) src/daft-writers/src/csv_writer.rs:210— src/daft-writers/src/csv_writer.rs:210-311 | src/daft-writers/src/json_writer.rs:171-272 — before extracting anything, compare `src/daft-writers/src/csv_writer.rs` and `src/daft-writers/src/json_writer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-writers/src/csv_writer.rs:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (50 lines × 2) src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:139— src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:139-188 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:130-179 — before extracting anything, compare `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs` and `src/daft-local-execution/src/sinks/window_partition_and_order_by.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39 lines × 2) src/daft-functions-temporal/src/date_construction.rs:213— src/daft-functions-temporal/src/date_construction.rs:213-251 | src/daft-functions-temporal/src/date_construction.rs:380-418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_construction.rs:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (38 lines × 3) src/daft-local-plan/src/plan.rs:159— src/daft-local-plan/src/plan.rs:159-196 | src/daft-local-plan/src/plan.rs:212-249 | src/daft-local-plan/src/plan.rs:262-299 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-plan/src/plan.rs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (35–36 lines × 2) src/daft-logical-plan/src/builder/mod.rs:1048— src/daft-logical-plan/src/builder/mod.rs:1048-1083 | src/daft-logical-plan/src/builder/mod.rs:1123-1157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/builder/mod.rs:1048` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-logical-plan/src/builder/mod.rs:1122` calls `enrich_with_stats`, `Some`, `clone` and `src/daft-logical-plan/src/builder/mod.rs:1047` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (34 lines × 2) src/daft-csv/src/read.rs:256— src/daft-csv/src/read.rs:256-289 | src/daft-json/src/read.rs:76-109 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (33 lines × 3) src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:50— src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:50-82 | src/daft-distributed/src/pipeline_node/join/stats.rs:32-64 | src/daft-local-execution/src/join/stats.rs:54-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-distributed/src/pipeline_node/join/stats.rs:31` calls `key_values_from_context` and `src/daft-distributed/src/pipeline_node/join/broadcast_join.rs:49` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (72 lines × 2) src/daft-functions-temporal/src/date_construction.rs:119— src/daft-functions-temporal/src/date_construction.rs:119-190 | src/daft-functions-temporal/src/date_construction.rs:286-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-temporal/src/date_construction.rs:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (29 lines × 3) src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:124— src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:124-152 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:115-143 | src/daft-local-execution/src/sinks/window_partition_only.rs:101-129 — before extracting anything, compare `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs` and `src/daft-local-execution/src/sinks/window_partition_and_order_by.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–29 lines × 2) src/daft-distributed/src/pipeline_node/sink.rs:50— src/daft-distributed/src/pipeline_node/sink.rs:50-77 | src/daft-local-execution/src/sinks/write.rs:53-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/sink.rs:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 3) src/common/io-config/src/cos.rs:94— src/common/io-config/src/cos.rs:94-120 | src/common/io-config/src/goosefs.rs:128-154 | src/common/io-config/src/tos.rs:84-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (26–27 lines × 3) src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:216— src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:216-241 | src/daft-local-execution/src/sinks/window_partition_and_order_by.rs:230-255 | src/daft-local-execution/src/sinks/window_partition_only.rs:141-167 — before extracting anything, compare `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs` and `src/daft-local-execution/src/sinks/window_partition_and_order_by.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/window_partition_and_dynamic_frame.rs:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–26 lines × 5) src/daft-csv/src/local.rs:200— src/daft-csv/src/local.rs:200-223 | src/daft-csv/src/read.rs:316-341 | src/daft-csv/src/read.rs:456-481 | src/daft-json/src/read.rs:162-185 | src/daft-json/src/read.rs:319-343 — before extracting anything, compare `src/daft-csv/src/local.rs` and `src/daft-csv/src/read.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:316` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-csv/src/local.rs:196` calls `strip_file_uri_to_path`, `unwrap_or`, `open` and `src/daft-csv/src/read.rs:455` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (24–25 lines × 3) src/daft-io/src/s3_like.rs:273— src/daft-io/src/s3_like.rs:273-297 | src/daft-io/src/s3_like.rs:306-329 | src/daft-io/src/s3_like.rs:338-361 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/s3_like.rs:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–25 lines × 2) src/daft-logical-plan/src/ops/sort.rs:35— src/daft-logical-plan/src/ops/sort.rs:35-58 | src/daft-logical-plan/src/ops/top_n.rs:56-80 — before extracting anything, compare `src/daft-logical-plan/src/ops/sort.rs` and `src/daft-logical-plan/src/ops/top_n.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/sort.rs:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) src/daft-functions-utf8/src/pad.rs:60— src/daft-functions-utf8/src/pad.rs:60-82 | src/daft-functions-utf8/src/utils.rs:144-166 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/pad.rs:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–21 lines × 2) src/daft-io/src/google_cloud.rs:438— src/daft-io/src/google_cloud.rs:438-455 | src/daft-io/src/s3_like.rs:1473-1493 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/google_cloud.rs:438` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20–21 lines × 2) src/daft-logical-plan/src/logical_plan.rs:305— src/daft-logical-plan/src/logical_plan.rs:305-325 | src/daft-logical-plan/src/logical_plan.rs:338-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/logical_plan.rs:305` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (20 lines × 5) src/daft-recordbatch/src/ops/inline_agg.rs:965— src/daft-recordbatch/src/ops/inline_agg.rs:965-984 | src/daft-recordbatch/src/ops/inline_agg.rs:992-1011 | src/daft-recordbatch/src/ops/inline_agg.rs:1055-1074 | src/daft-recordbatch/src/ops/inline_agg.rs:1083-1102 | src/daft-recordbatch/src/ops/inline_agg.rs:1412-1431 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:965` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 3) src/daft-csv/src/read.rs:510— src/daft-csv/src/read.rs:510-529 | src/daft-json/src/read.rs:374-393 | src/daft-warc/src/lib.rs:578-596 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:510` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18–20 lines × 2) src/daft-distributed/src/pipeline_node/shuffles/pre_shuffle_merge.rs:133— src/daft-distributed/src/pipeline_node/shuffles/pre_shuffle_merge.rs:133-152 | src/daft-distributed/src/pipeline_node/shuffles/pre_shuffle_merge.rs:158-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/shuffles/pre_shuffle_merge.rs:133` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–19 lines × 4) src/daft-csv/src/read.rs:348— src/daft-csv/src/read.rs:348-366 | src/daft-csv/src/read.rs:488-505 | src/daft-json/src/read.rs:193-208 | src/daft-json/src/read.rs:351-369 — before extracting anything, compare `src/daft-csv/src/read.rs` and `src/daft-json/src/read.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-csv/src/read.rs:348` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19 lines × 3) src/daft-local-execution/src/pipeline.rs:553— src/daft-local-execution/src/pipeline.rs:553-571 | src/daft-local-execution/src/pipeline.rs:591-609 | src/daft-local-execution/src/pipeline.rs:623-641 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/pipeline.rs:553` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–19 lines × 2) src/daft-scan/src/glob.rs:236— src/daft-scan/src/glob.rs:236-254 | src/daft-scan/src/glob.rs:344-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-scan/src/glob.rs:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16–18 lines × 4) src/daft-writers/src/lib.rs:170— src/daft-writers/src/lib.rs:170-186 | src/daft-writers/src/lib.rs:191-208 | src/daft-writers/src/lib.rs:213-230 | src/daft-writers/src/lib.rs:240-255 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-writers/src/lib.rs:170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–18 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:1179— src/daft-recordbatch/src/ops/inline_agg.rs:1179-1196 | src/daft-recordbatch/src/ops/inline_agg.rs:1424-1440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:1179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–18 lines × 2) src/daft-recordbatch/src/ops/inline_agg.rs:1227— src/daft-recordbatch/src/ops/inline_agg.rs:1227-1242 | src/daft-recordbatch/src/ops/inline_agg.rs:1253-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/ops/inline_agg.rs:1227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-recordbatch/src/ops/inline_agg.rs:1250` calls `is_null`, `push` and `src/daft-recordbatch/src/ops/inline_agg.rs:1226` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15–17 lines × 3) src/common/io-config/src/gcs.rs:66— src/common/io-config/src/gcs.rs:66-82 | src/common/io-config/src/http.rs:41-55 | src/common/io-config/src/s3.rs:174-190 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/io-config/src/gcs.rs:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:100— src/daft-local-execution/src/join/left_right_join.rs:100-115 | src/daft-local-execution/src/join/outer_join.rs:80-96 — before extracting anything, compare `src/daft-local-execution/src/join/left_right_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/left_right_join.rs:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-local-execution/src/join/outer_join.rs:97` calls `mark_used` and `src/daft-local-execution/src/join/left_right_join.rs:116` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 4) src/daft-recordbatch/src/ops/joins/hash_join.rs:53— src/daft-recordbatch/src/ops/joins/hash_join.rs:53-68 | src/daft-recordbatch/src/ops/joins/hash_join.rs:153-168 | src/daft-recordbatch/src/ops/joins/hash_join.rs:263-278 | src/daft-recordbatch/src/ops/joins/hash_join.rs:346-361 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15–16 lines × 3) src/daft-core/src/series/utils/python_fn.rs:53— src/daft-core/src/series/utils/python_fn.rs:53-67 | src/daft-core/src/series/utils/python_fn.rs:85-100 | src/daft-core/src/series/utils/python_fn.rs:146-161 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/utils/python_fn.rs:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 4) src/daft-local-execution/src/join/inner_join.rs:51— src/daft-local-execution/src/join/inner_join.rs:51-65 | src/daft-local-execution/src/join/left_right_join.rs:55-69 | src/daft-local-execution/src/join/left_right_join.rs:135-149 | src/daft-local-execution/src/join/outer_join.rs:116-130 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/left_right_join.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/inner_join.rs:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 3) src/daft-distributed/src/pipeline_node/sort.rs:526— src/daft-distributed/src/pipeline_node/sort.rs:526-540 | src/daft-distributed/src/pipeline_node/sort.rs:551-564 | src/daft-distributed/src/pipeline_node/sort.rs:624-637 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/sort.rs:526` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) src/daft-local-execution/src/join/left_right_join.rs:34— src/daft-local-execution/src/join/left_right_join.rs:34-48 | src/daft-local-execution/src/join/outer_join.rs:91-104 — before extracting anything, compare `src/daft-local-execution/src/join/left_right_join.rs` and `src/daft-local-execution/src/join/outer_join.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/left_right_join.rs:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) src/daft-local-execution/src/sinks/dedup.rs:125— src/daft-local-execution/src/sinks/dedup.rs:125-139 | src/daft-local-execution/src/sinks/grouped_aggregate.rs:354-366 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/sinks/dedup.rs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–15 lines × 2) src/daft-recordbatch/src/lib.rs:982— src/daft-recordbatch/src/lib.rs:982-996 | src/daft-recordbatch/src/lib.rs:1360-1371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:982` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `expr` to `BoundExpr` in one and `&BoundExpr` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 4) src/common/image/src/image.rs:200— src/common/image/src/image.rs:200-213 | src/common/image/src/image.rs:218-231 | src/common/image/src/image.rs:236-249 | src/common/image/src/image.rs:254-267 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/common/image/src/image.rs:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 3) src/daft-distributed/src/pipeline_node/actor_udf.rs:258— src/daft-distributed/src/pipeline_node/actor_udf.rs:258-270 | src/daft-distributed/src/pipeline_node/udf.rs:192-204 | src/daft-logical-plan/src/ops/udf.rs:109-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/actor_udf.rs:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–14 lines × 3) src/daft-ext-internal/src/aggregate.rs:192— src/daft-ext-internal/src/aggregate.rs:192-202 | src/daft-ext-internal/src/function.rs:123-134 | src/daft-ext-internal/src/function.rs:165-178 — before extracting anything, compare `src/daft-ext-internal/src/aggregate.rs` and `src/daft-ext-internal/src/function.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-ext-internal/src/function.rs:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 3) src/daft-local-execution/src/join/join_node.rs:68— src/daft-local-execution/src/join/join_node.rs:68-81 | src/daft-local-execution/src/sinks/blocking_sink.rs:470-483 | src/daft-local-execution/src/streaming_sink/base.rs:454-467 — before extracting anything, compare `src/daft-local-execution/src/join/join_node.rs` and `src/daft-local-execution/src/sinks/blocking_sink.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/join/join_node.rs:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-local-execution/src/join/join_node.rs:82` calls `unwrap` and `src/daft-local-execution/src/sinks/blocking_sink.rs:484` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–13 lines × 2) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:302— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:302-314 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:338-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 4) src/daft-file/src/functions.rs:97— src/daft-file/src/functions.rs:97-108 | src/daft-file/src/functions.rs:191-202 | src/daft-file/src/functions.rs:285-295 | src/daft-file/src/functions.rs:377-387 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-file/src/functions.rs:97` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–12 lines × 3) src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:182— src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:182-191 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:214-225 | src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:242-253 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:240` calls `clone` and `src/daft-logical-plan/src/optimization/rules/push_down_projection.rs:212` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–12 lines × 2) src/daft-schema/src/dtype.rs:191— src/daft-schema/src/dtype.rs:191-199 | src/daft-schema/src/dtype.rs:230-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-schema/src/dtype.rs:230` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 5) src/daft-core/src/array/ops/broadcast.rs:63— src/daft-core/src/array/ops/broadcast.rs:63-73 | src/daft-core/src/array/ops/broadcast.rs:90-99 | src/daft-core/src/array/ops/broadcast.rs:111-120 | src/daft-core/src/array/ops/broadcast.rs:134-143 | src/daft-core/src/array/ops/broadcast.rs:157-166 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/array/ops/broadcast.rs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 4) src/daft-distributed/src/pipeline_node/explode.rs:62— src/daft-distributed/src/pipeline_node/explode.rs:62-72 | src/daft-distributed/src/pipeline_node/filter.rs:62-72 | src/daft-distributed/src/pipeline_node/stage_checkpoint_keys.rs:97-107 | src/daft-distributed/src/pipeline_node/udf.rs:60-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-distributed/src/pipeline_node/explode.rs:62` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9–10 lines × 4) src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:331— src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:331-339 | src/daft-local-execution/src/join/join_node.rs:78-86 | src/daft-local-execution/src/sources/source.rs:203-212 | src/daft-local-execution/src/streaming_sink/base.rs:464-472 — before extracting anything, compare `src/daft-local-execution/src/join/join_node.rs` and `src/daft-local-execution/src/streaming_sink/base.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:331` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 3) src/daft-local-plan/src/plan.rs:199— src/daft-local-plan/src/plan.rs:199-208 | src/daft-local-plan/src/plan.rs:252-259 | src/daft-local-plan/src/plan.rs:302-309 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-plan/src/plan.rs:199` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) src/daft-io/src/http.rs:430— src/daft-io/src/http.rs:430-437 | src/daft-io/src/huggingface/mod.rs:381-390 — before extracting anything, compare `src/daft-io/src/http.rs` and `src/daft-io/src/huggingface/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/http.rs:430` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 4) src/daft-core/src/array/growable/fixed_size_list_growable.rs:35— src/daft-core/src/array/growable/fixed_size_list_growable.rs:35-43 | src/daft-core/src/array/growable/list_growable.rs:40-48 | src/daft-core/src/array/growable/python_growable.rs:29-36 | src/daft-core/src/array/growable/struct_growable.rs:43-51 — before extracting anything, compare `src/daft-core/src/array/growable/python_growable.rs` and `src/daft-core/src/array/growable/struct_growable.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-core/src/array/growable/list_growable.rs:50` calls `iter`, `offsets` and `src/daft-core/src/array/growable/fixed_size_list_growable.rs:44` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 3) src/daft-logical-plan/src/ops/project.rs:454— src/daft-logical-plan/src/ops/project.rs:454-461 | src/daft-logical-plan/src/ops/project.rs:505-513 | src/daft-logical-plan/src/ops/project.rs:532-539 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-logical-plan/src/ops/project.rs:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–9 lines × 2) src/daft-json/src/read.rs:243— src/daft-json/src/read.rs:243-251 | src/daft-parquet/src/read.rs:373-378 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-json/src/read.rs:243` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) src/daft-io/src/s3_like.rs:854— src/daft-io/src/s3_like.rs:854-861 | src/daft-io/src/s3_like.rs:927-934 | src/daft-io/src/s3_like.rs:1035-1042 | src/daft-io/src/s3_like.rs:1171-1178 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/s3_like.rs:854` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 5) src/daft-local-execution/src/join/inner_join.rs:53— src/daft-local-execution/src/join/inner_join.rs:53-59 | src/daft-local-execution/src/join/left_right_join.rs:57-63 | src/daft-local-execution/src/join/left_right_join.rs:137-143 | src/daft-local-execution/src/join/left_right_join.rs:186-192 | src/daft-local-execution/src/join/outer_join.rs:118-124 — before extracting anything, compare `src/daft-local-execution/src/join/inner_join.rs` and `src/daft-local-execution/src/join/left_right_join.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6–7 lines × 3) src/daft-functions-utf8/src/to_datetime.rs:124— src/daft-functions-utf8/src/to_datetime.rs:124-130 | src/daft-functions-utf8/src/to_datetime.rs:144-149 | src/daft-functions-utf8/src/to_datetime.rs:156-162 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/to_datetime.rs:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–6 lines × 3) src/daft-dsl/src/python_udf/batch.rs:161— src/daft-dsl/src/python_udf/batch.rs:161-166 | src/daft-dsl/src/python_udf/batch.rs:207-212 | src/daft-dsl/src/python_udf/row_wise.rs:193-195 — before extracting anything, compare `src/daft-dsl/src/python_udf/batch.rs` and `src/daft-dsl/src/python_udf/row_wise.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-dsl/src/python_udf/batch.rs:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-dsl/src/python_udf/batch.rs:166` calls `Ok`, `cast`, `rename` and `src/daft-dsl/src/python_udf/row_wise.rs:195` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (2–6 lines × 3) src/daft-functions/src/numeric/pmod.rs:101— src/daft-functions/src/numeric/pmod.rs:101-102 | src/daft-functions/src/numeric/pmod.rs:130-135 | src/daft-functions/src/numeric/pmod.rs:143-148 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/numeric/pmod.rs:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 6) src/daft-local-plan/src/plan.rs:164— src/daft-local-plan/src/plan.rs:164-168 | src/daft-local-plan/src/plan.rs:217-221 | src/daft-local-plan/src/plan.rs:267-271 | src/daft-logical-plan/src/logical_plan.rs:439-443 | src/daft-logical-plan/src/logical_plan.rs:1037-1041 | src/daft-logical-plan/src/logical_plan.rs:1072-1076 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-logical-plan/src/logical_plan.rs:444` calls `Offset` and `src/daft-local-plan/src/plan.rs:169` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (3–5 lines × 3) src/daft-core/src/series/utils/python_fn.rs:40— src/daft-core/src/series/utils/python_fn.rs:40-44 | src/daft-core/src/series/utils/python_fn.rs:77-79 | src/daft-core/src/series/utils/python_fn.rs:135-139 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-core/src/series/utils/python_fn.rs:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-core/src/series/utils/python_fn.rs:140` calls `from`, `to_pylist` and `src/daft-core/src/series/utils/python_fn.rs:81` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (2–5 lines × 3) src/daft-recordbatch/src/lib.rs:1625— src/daft-recordbatch/src/lib.rs:1625-1629 | src/daft-recordbatch/src/lib.rs:1642-1646 | src/daft-recordbatch/src/lib.rs:1673-1674 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-recordbatch/src/lib.rs:1625` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/daft-recordbatch/src/lib.rs:1642` calls `derive_eval_schema` and `src/daft-recordbatch/src/lib.rs:1673` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 7) src/common/resource-request/src/lib.rs:259— src/common/resource-request/src/lib.rs:259-265 | src/daft-csv/src/options.rs:143-149 | src/daft-csv/src/options.rs:302-308 | src/daft-csv/src/options.rs:386-392 | src/daft-json/src/options.rs:106-112 | src/daft-json/src/options.rs:156-162 | src/daft-json/src/options.rs:230-236 — there are 7 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 6) src/daft-functions/src/distance/cosine.rs:58— src/daft-functions/src/distance/cosine.rs:58-67 | src/daft-functions/src/distance/dot_product.rs:52-61 | src/daft-functions/src/distance/euclidean.rs:56-65 | src/daft-functions/src/similarity/cosine.rs:64-73 | src/daft-functions/src/similarity/jaccard.rs:66-75 | src/daft-functions/src/similarity/pearson.rs:73-82 — `src/daft-functions/src/distance/cosine.rs` and `src/daft-functions/src/similarity/cosine.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 31 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/distance/cosine.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) src/daft-io/src/azure_blob.rs:984— src/daft-io/src/azure_blob.rs:984-999 | src/daft-io/src/google_cloud.rs:664-679 | src/daft-io/src/s3_like.rs:1403-1418 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-io/src/azure_blob.rs:984` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 11) src/daft-logical-plan/src/ops/into_batches.rs:39— src/daft-logical-plan/src/ops/into_batches.rs:39-44 | src/daft-logical-plan/src/ops/into_partitions.rs:39-44 | src/daft-logical-plan/src/ops/monotonically_increasing_id.rs:60-65 | src/daft-logical-plan/src/ops/pivot.rs:86-91 | src/daft-logical-plan/src/ops/project.rs:92-97 | src/daft-logical-plan/src/ops/repartition.rs:39-44 | src/daft-logical-plan/src/ops/shuffle.rs:50-54 | src/daft-logical-plan/src/ops/sort.rs:73-78 | src/daft-logical-plan/src/ops/udf.rs:76-81 | src/daft-logical-plan/src/ops/vllm.rs:53-57 | src/daft-logical-plan/src/ops/window.rs:113-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 11 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `crate) fn with_materialized_stats(mut` in one and `mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/daft-logical-plan/src/ops/pivot.rs:95` calls `push`, `to_string` and `src/daft-logical-plan/src/ops/into_partitions.rs:48` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 9) src/daft-functions-utf8/src/case.rs:33— src/daft-functions-utf8/src/case.rs:33-102 | src/daft-functions-utf8/src/case.rs:33-66 | src/daft-functions-utf8/src/case.rs:33-72 | src/daft-functions-utf8/src/case.rs:33-78 | src/daft-functions-utf8/src/case.rs:33-84 | src/daft-functions-utf8/src/case.rs:33-90 | src/daft-functions-utf8/src/case.rs:33-96 | src/daft-functions-utf8/src/lower.rs:27-35 | src/daft-functions-utf8/src/upper.rs:27-35 — there are 9 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions-utf8/src/case.rs:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `inputs` to `FunctionArgs<Series>` in one and `daft_dsl::functions::FunctionArgs<Series>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 6) src/daft-functions/src/distance/cosine.rs:44— src/daft-functions/src/distance/cosine.rs:44-52 | src/daft-functions/src/distance/dot_product.rs:38-46 | src/daft-functions/src/distance/euclidean.rs:41-50 | src/daft-functions/src/similarity/cosine.rs:50-58 | src/daft-functions/src/similarity/jaccard.rs:51-60 | src/daft-functions/src/similarity/pearson.rs:58-67 — `src/daft-functions/src/distance/cosine.rs` and `src/daft-functions/src/similarity/cosine.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 31 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-functions/src/distance/cosine.rs:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 8) src/daft-functions-utf8/src/left.rs:83— src/daft-functions-utf8/src/left.rs:83-92 | src/daft-functions-utf8/src/regexp_extract.rs:86-95 | src/daft-functions-utf8/src/repeat.rs:88-98 | src/daft-functions-utf8/src/replace.rs:132-141 | src/daft-functions-utf8/src/right.rs:90-99 | src/daft-functions-utf8/src/split_part.rs:102-111 | src/daft-functions-utf8/src/substring_index.rs:100-109 | src/daft-functions-utf8/src/translate.rs:83-92 — before extracting anything, compare `src/daft-functions-utf8/src/split_part.rs` and `src/daft-functions-utf8/src/substring_index.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 5) src/daft-local-execution/src/concat.rs:134— src/daft-local-execution/src/concat.rs:134-142 | src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:342-350 | src/daft-local-execution/src/join/join_node.rs:89-97 | src/daft-local-execution/src/sinks/blocking_sink.rs:490-498 | src/daft-local-execution/src/streaming_sink/base.rs:475-483 — before extracting anything, compare `src/daft-local-execution/src/join/join_node.rs` and `src/daft-local-execution/src/sinks/blocking_sink.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/daft-local-execution/src/concat.rs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 9) src/daft-sql/src/modules/temporal.rs:361— src/daft-sql/src/modules/temporal.rs:361-365 | src/daft-sql/src/modules/temporal.rs:393-397 | src/daft-sql/src/modules/temporal.rs:425-429 | src/daft-sql/src/modules/temporal.rs:612-619 | src/daft-sql/src/modules/temporal.rs:816-823 | src/daft-sql/src/modules/temporal.rs:865-869 | src/daft-sql/src/modules/temporal.rs:898-902 | src/daft-sql/src/modules/temporal.rs:932-939 | src/daft-sql/src/modules/temporal.rs:977-981 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (39–69 lines × 3) daft/dataframe/dataframe.py:1125— daft/dataframe/dataframe.py:1125-1193 | daft/dataframe/dataframe.py:1238-1298 | daft/dataframe/dataframe.py:1338-1376 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (51–52 lines × 2) daft/catalog/__gravitino/_client.py:228— daft/catalog/__gravitino/_client.py:228-279 | daft/catalog/__gravitino/_client.py:310-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (33–35 lines × 2) daft/functions/datetime.py:1715— daft/functions/datetime.py:1715-1747 | daft/functions/datetime.py:1759-1793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26 lines × 4) daft/recordbatch/micropartition.py:221— daft/recordbatch/micropartition.py:221-246 | daft/recordbatch/micropartition.py:428-453 | daft/recordbatch/recordbatch.py:264-289 | daft/recordbatch/recordbatch.py:441-466 — before extracting anything, compare `daft/recordbatch/micropartition.py` and `daft/recordbatch/recordbatch.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 4) daft/dataframe/dataframe.py:1093— daft/dataframe/dataframe.py:1093-1109 | daft/dataframe/dataframe.py:1208-1225 | daft/dataframe/dataframe.py:1310-1326 | daft/dataframe/dataframe.py:1384-1400 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `daft/dataframe/dataframe.py:1093` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `daft/dataframe/dataframe.py:1206` calls `from_str` and `daft/dataframe/dataframe.py:1092` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–11 lines × 2) daft/ai/lm_studio/protocols/text_embedder.py:69— daft/ai/lm_studio/protocols/text_embedder.py:69-77 | daft/ai/openai/protocols/text_embedder.py:137-147 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `daft/ai/openai/protocols/text_embedder.py:137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (56 lines × 2) daft/functions/distance.py:9— daft/functions/distance.py:9-65 | daft/functions/similarity.py:9-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Duplicated block (23 lines × 2 locations) src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:74— src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:74 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:138 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (20 lines × 2 locations) src/daft-dashboard/frontend/src/components/ui/BookOpenTextIcon.tsx:107— src/daft-dashboard/frontend/src/components/ui/BookOpenTextIcon.tsx:107 · src/daft-dashboard/frontend/src/components/ui/BookOpenTextIcon.tsx:131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (19 matched lines × 2 locations) · ×1
Duplicated block with local edits (19 matched lines × 2 locations) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:349— src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:349 · src/daft-dashboard/frontend/src/app/query/plan-visualizer.tsx:123 — the two spans are one implementation copied and then locally edited — 98 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (17 lines × 2 locations) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:260— src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:260 · src/daft-dashboard/frontend/src/app/query/plan-visualizer.tsx:74 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (14 lines × 3 locations) src/daft-dashboard/frontend/src/components/ui/card.tsx:5— src/daft-dashboard/frontend/src/components/ui/card.tsx:5 · src/daft-dashboard/frontend/src/components/ui/card.tsx:31 · src/daft-dashboard/frontend/src/components/ui/card.tsx:51 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (10 lines × 2 locations) src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:388— src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:388 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 6 locations) src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:50— src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:50 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:88 · src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:152 · src/daft-dashboard/frontend/src/components/ui/sheet.tsx:111 · +2 more site(s) not listed — the 6 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:59— src/daft-dashboard/frontend/src/components/ui/dropdown-menu.tsx:59 · src/daft-dashboard/frontend/src/components/ui/tooltip.tsx:14 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (7 lines × 2 locations) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:101— src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:101 · src/daft-dashboard/frontend/src/app/query/progress-table.tsx:22 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 3 locations) src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:301— src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:301 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:438 · src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:749 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 2 locations) src/daft-dashboard/frontend/src/app/query/status.tsx:10— src/daft-dashboard/frontend/src/app/query/status.tsx:10 · src/daft-dashboard/frontend/src/app/query/status.tsx:24 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function QueryPageInner (cyclomatic 38, cognitive 31) REDACTED:64— QueryPageInner has cyclomatic complexity 38 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function PhysicalNodeCard (cyclomatic 25, cognitive 21) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:115— PhysicalNodeCard has cyclomatic complexity 25 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function TasksSidebar (cyclomatic 21, cognitive 18) src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:41— TasksSidebar has cyclomatic complexity 21 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function PhysicalPlanTree (cyclomatic 14, cognitive 13) src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:278— PhysicalPlanTree has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getEffectiveStatus (cyclomatic 13, cognitive 19) src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:53— getEffectiveStatus has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx · ×1
src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx: 820 lines of code src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx:1— src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx has 820 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/daft-dashboard/frontend/src/components/ui/sidebar.tsx · ×1
src/daft-dashboard/frontend/src/components/ui/sidebar.tsx: 666 lines of code src/daft-dashboard/frontend/src/components/ui/sidebar.tsx:1— src/daft-dashboard/frontend/src/components/ui/sidebar.tsx has 666 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx · ×1
src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx: 417 lines of code src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:1— src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~720 LoC) src/daft-dashboard/frontend/src/components/ui/sidebar.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~140 LoC) src/daft-dashboard/frontend/src/components/ui/sheet.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/daft-dashboard/frontend/src/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~92 LoC) src/daft-dashboard/frontend/src/components/ui/card.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~70 LoC) src/daft-dashboard/frontend/src/components/ui/note.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~45 LoC) src/daft-dashboard/frontend/src/components/ui/resizable.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~31 LoC) src/daft-dashboard/frontend/src/components/ui/separator.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/daft-dashboard/frontend/src/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~26 LoC) src/daft-dashboard/frontend/src/components/ui/label.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~24 LoC) src/daft-dashboard/frontend/src/components/ui/input.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/daft-dashboard/frontend/src/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~21 LoC) src/daft-dashboard/frontend/src/hooks/use-mobile.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/daft-dashboard/frontend/src/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~17 LoC) src/daft-dashboard/frontend/src/components/ui/skeleton.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/daft-dashboard/frontend/src/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~11 LoC) src/daft-dashboard/frontend/src/components/ui/collapsible.tsx— no import path from any entry point (4 application, 4 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'react-icons' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'zustand' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X1 · Async correctness· Task from `self.loop.create_task` is not kept · ×1
Task from `self.loop.create_task` is not kept daft/execution/vllm.py:147— The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
X1 · Async correctness· Task from `asyncio.create_task` is not kept · ×1
Task from `asyncio.create_task` is not kept daft/execution/vllm.py:201— The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
Orphaned file src/common/image/src/image.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tools/convert_md_to_notebook.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-local-execution/src/join/probe.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-minhash/src/tests.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-core/src/utils/supertype.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-core/src/lit/deserializer.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-core/src/array/union_array.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/common/image/src/cow_image.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-algebra/src/simplify/boolean.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file benchmarking/tpcds/__main__.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-local-execution/src/join/hash_join.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file benchmarking/tpch/data_generation.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-core/src/array/growable/map_growable.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-text/src/read.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file daft/execution/vllm.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-dashboard/frontend/src/app/query/tasks-grouping.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file daft/window.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file benchmarking/tpch/__main__.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-distributed/src/scheduling/local_worker.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-distributed/src/pipeline_node/test_helpers.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-csv/src/options.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-parquet/src/reader/rg_processor.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tools/aggregate_test_durations.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-io/src/range_expansion.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/daft-logical-plan/src/optimization/rules/lift_project_from_agg.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Interpolated log message defeats structured logging src/daft-micropartition/src/partitioning.rs:227— `trace!` at line 227 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/statistics/mod.rs:227— `debug!` at line 227 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/statistics/mod.rs:273— `error!` at line 273 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/statistics/mod.rs:284— `error!` at line 284 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/statistics/stats.rs:231— `debug!` at line 231 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/python/dashboard.rs:82— `error!` at line 82 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/python/ray/worker_manager.rs:447— `info!` at line 447 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/python/ray/worker_manager.rs:669— `info!` at line 669 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/python/ray/worker_manager.rs:693— `info!` at line 693 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/python/ray/worker_manager.rs:721— `warn!` at line 721 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/plan/runner.rs:216— `warn!` at line 216 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/pipeline_node/limit.rs:48— `warn!` at line 48 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-distributed/src/pipeline_node/join/key_filtering_join.rs:121— `error!` at line 121 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/client.rs:80— `error!` at line 80 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/client.rs:91— `error!` at line 91 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:85— `error!` at line 85 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:106— `error!` at line 106 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:142— `error!` at line 142 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:146— `error!` at line 146 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:263— `info!` at line 263 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:266— `error!` at line 266 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:300— `debug!` at line 300 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:307— `error!` at line 307 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:332— `error!` at line 332 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/daft-dashboard/src/engine.rs:344— `warn!` at line 344 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Duplicated predicate src/daft-dashboard/frontend/src/app/query/edge-label.tsx:48— `amplification > 0 && amplification <= REDUCTION_THRESHOLD` appears character-identically in 2 files — src/daft-dashboard/frontend/src/app/query/edge-label.tsx, src/daft-dashboard/frontend/src/app/query/tree-colors.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx:138— `queryStatus === "Finished" || queryStatus === "Failed" || queryStatus === "Canceled" || queryStatus === "Dead"` appears character-identically in 2 files — src/daft-dashboard/frontend/src/app/query/physical-plan-tree.tsx, src/daft-dashboard/frontend/src/app/query/progress-table.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate daft/dataframe/dataframe.py:3255— `fraction is not None and size is not None` appears character-identically in 3 files — daft/dataframe/dataframe.py, daft/recordbatch/micropartition.py, daft/recordbatch/recordbatch.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate daft/io/_avro.py:61— `isinstance(path, list) and len(path) == 0` appears character-identically in 7 files — daft/io/_avro.py, daft/io/_blob.py, daft/io/_csv.py, daft/io/_json.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:426— `partition_values is not None and pushdowns.partition_filters is not None` appears character-identically in 2 files — REDACTED, daft/io/hudi/hudi_scan.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:364— `pushdowns.limit is not None and pushdowns.filters is None and pushdowns.partition_filters is None` appears character-identically in 2 files — REDACTED, daft/io/hudi/hudi_scan.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate daft/catalog/__gravitino/_client.py:435— `scheme == "az" or scheme == "abfs" or scheme == "abfss"` appears character-identically in 3 files — daft/catalog/__gravitino/_client.py, daft/catalog/__unity/_client.py, daft/io/object_store_options.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:348— `self._partition_fields and pushdowns.partition_filters is None` appears character-identically in 2 files — REDACTED, daft/io/hudi/hudi_scan.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate daft/dataframe/dataframe.py:2043— `unity_catalog.module_available() and isinstance(table, unity_catalog.UnityCatalogTable)` appears character-identically in 2 files — daft/dataframe/dataframe.py, daft/io/delta_lake/_deltalake.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate daft/datasets/lerobot.py:126— `width is not None and height is not None` appears character-identically in 2 files — daft/datasets/lerobot.py, daft/file/video.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-local-execution/src/sources/scan_task.rs:108— `!receiver_exhausted || !pending_tasks.is_empty() || !task_set.is_empty()` appears character-identically in 2 files — src/daft-local-execution/src/sources/scan_task.rs, src/daft-local-execution/src/sources/shuffle_read.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-functions-utf8/src/lpad.rs:45— `data.dtype.is_null() || (data.dtype.is_string() && length.dtype.is_integer() && pad.dtype.is_string())` appears character-identically in 2 files — src/daft-functions-utf8/src/lpad.rs, src/daft-functions-utf8/src/rpad.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-functions-list/src/count_distinct.rs:38— `field.dtype.is_list() || field.dtype.is_fixed_size_list()` appears character-identically in 5 files — src/daft-functions-list/src/count_distinct.rs, src/daft-functions-list/src/distinct.rs, src/daft-functions-list/src/explode.rs, src/daft-functions-list/src/flatten.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-functions-list/src/max.rs:40— `field.dtype.is_numeric() || field.dtype.is_boolean()` appears character-identically in 2 files — src/daft-functions-list/src/max.rs, src/daft-functions-list/src/min.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-functions-utf8/src/regexp_extract.rs:71— `index.dtype.is_numeric() && !index.dtype.is_floating()` appears character-identically in 2 files — src/daft-functions-utf8/src/regexp_extract.rs, src/daft-functions-utf8/src/regexp_extract_all.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-functions-list/src/append.rs:55— `input.dtype.is_list() || input.dtype.is_fixed_size_list()` appears character-identically in 2 files — src/daft-functions-list/src/append.rs, src/daft-functions-list/src/get.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-functions/src/numeric/hypot.rs:81— `lhs_dt.is_numeric() && rhs_dt.is_numeric()` appears character-identically in 2 files — src/daft-functions/src/numeric/hypot.rs, src/daft-functions/src/numeric/trigonometry.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-csv/src/read.rs:181— `matches!(source_type, SourceType::File) && !is_compressed` appears character-identically in 2 files — src/daft-csv/src/read.rs, src/daft-json/src/read.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-logical-plan/src/optimization/rules/push_down_aggregation.rs:52— `scan_op.as_pushdown_filter() && self.strict_pushdown` appears character-identically in 2 files — src/daft-logical-plan/src/optimization/rules/push_down_aggregation.rs, src/daft-logical-plan/src/optimization/rules/push_down_filter.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-core/src/array/fixed_size_list_array.rs:252— `self.array.nulls() && nulls.is_null(self.idx)` appears character-identically in 2 files — src/daft-core/src/array/fixed_size_list_array.rs, src/daft-core/src/array/list_array.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-distributed/src/scheduling/scheduler/default.rs:66— `self.worker_snapshots.get(worker_id) && worker.can_schedule_task(task)` appears character-identically in 2 files — src/daft-distributed/src/scheduling/scheduler/default.rs, src/daft-distributed/src/scheduling/scheduler/linear.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/daft-local-execution/src/intermediate_ops/intermediate_op.rs:157— `workers_idle && self.batch_manager.can_flush(input_id)` appears character-identically in 2 files — src/daft-local-execution/src/intermediate_ops/intermediate_op.rs, src/daft-local-execution/src/streaming_sink/base.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 8 significant file(s) lose their only recent owner: src/daft-logical-plan/src/optimization/rules/rewrite_checkpoint_source.rs, src/daft-checkpoint/src/test_utils.rs, daft/checkpoint.py, src/daft-checkpoint/src/scan.rs, src/common/checkpoint-config/src/lib.rs, src/daft-checkpoint/src/store.rs, src/daft-checkpoint/src/config.rs, src/daft-local-execution/src/intermediate_ops/stage_checkpoint_keys.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: src/daft-mcap/src/read.rs, src/daft-mcap/src/lib.rs, tools/trace_to_speedscope.py, src/daft-mcap/src/test_utils.rs, src/daft-mcap/src/stats.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: src/daft-local-execution/src/join/asof_join.rs, src/daft-distributed/src/pipeline_node/join/asof_join.rs, src/daft-logical-plan/src/ops/asof_join.rs, src/daft-distributed/src/pipeline_node/join/translate_asof_join.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: src/daft-recordbatch/src/ops/inline_agg.rs, src/daft-functions-temporal/src/date_arithmetic.rs, src/daft-functions/src/numeric/try_divide.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 3 significant file(s) lose their only recent owner: src/daft-dashboard/frontend/src/app/query/tasks-sidebar.tsx, src/daft-dashboard/frontend/src/app/query/tasks-grouping.ts, src/daft-distributed/src/pipeline_node/test_helpers.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 3 significant file(s) lose their only recent owner: src/daft-ext-internal/src/module.rs, daft/functions/jev_.py, daft/io/delta_lake/_visitors.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 3 significant file(s) lose their only recent owner: src/daft-core/src/array/ops/clip.rs, src/daft-functions-tokenize/src/encode.rs, src/daft-functions-utf8/src/find.rs. Pair on, review, or document these before any departure.
Silent fallback default on Err src/daft-dsl/src/python_udf/row_wise.rs:248— `serialize_pyobject_for_logging` turns every `Err` into `"<unable_to_stringify>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/daft-dsl/src/python_udf/row_wise.rs:296— `capture_exception_details` turns every `Err` into `"<unrepresentable frame>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/daft-writers/src/pyarrow.rs:102— `new_csv_writer` turns every `Err` into `",".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/daft-writers/src/parquet_writer.rs:89— `native_parquet_writer_supported` turns every `Err` into `Ok(false)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
P10 · Library API & versioning· Implementation type on the public API · ×3
Implementation type on the public API src/common/metrics/src/snapshot.rs:26— 1 public type in `common_metrics.snapshot` is marked as implementation by its own namespace, folder or name: `StatSnapshotImpl` (src/common/metrics/src/snapshot.rs:26, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API src/daft-checkpoint/src/impls/s3.rs:110— 1 public type in `daft_checkpoint.impls.s3` is marked as implementation by its own namespace, folder or name: `S3CheckpointStore` (src/daft-checkpoint/src/impls/s3.rs:110, `impls`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API src/daft-core/src/datatypes/logical.rs:19— 1 public type in `daft_core.datatypes.logical` is marked as implementation by its own namespace, folder or name: `LogicalArrayImpl` (src/daft-core/src/datatypes/logical.rs:19, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
redundant comment docs/js/custom.js:23— "Process links when DOM is loaded" repeats the code it sits on: 4 of its 4 words (process, links, dom, loaded) are already in `document.addEventListener('DOMContentLoaded', processExternalLinks);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/daft-dashboard/frontend/src/components/ui/sidebar.tsx:85— "This sets the cookie to keep the sidebar state." repeats the code it sits on: 4 of its 5 words (sets, cookie, sidebar, state) are already in `document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (34 single-owned of 920 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 920 of the 1372 production source files in this repository met that bar). They are anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)), anonymized user #11 (1 file(s)), anonymized user #12 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/daft-functions-utf8/src/split_part.rs, daft/io/_orc.py, daft/ai/transformers/protocols/prompter.py, daft/dataframe/to_torch.py, benchmarking/lerobot/hand_tracking.py.
No ADRs found REDACTED:24— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 24).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 3 of 84 project(s) overshoot their size bounds, lowering Project Cohesion to 9.3/10. The most over is `(repository root)` (55411 LoC, 530 module-visible types across 60 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 212 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/common/image/src/image.rs, tools/convert_md_to_notebook.py, src/daft-local-execution/src/join/probe.rs, src/daft-minhash/src/tests.rs, src/daft-core/src/utils/supertype.rs, src/daft-core/src/lit/deserializer.rs, src/daft-core/src/array/union_array.rs, src/common/image/src/cow_image.rs (and 204 more) (224 orphaned of 920 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 920 of the 1372 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 24/26 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `src/daft-dashboard/frontend`, `src/daft-shuffles`.
No SAST REDACTED:9— No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 14 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling· Dependabot does not watch npm/uv · ×1
Dependabot does not watch npm/uv REDACTED:2— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
R7 · Dead Code· Unused export 'getStatusBorderColor' · ×1
Unused export 'getStatusBorderColor' src/daft-dashboard/frontend/src/app/query/stats-utils.tsx:172— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused module-local declaration 'STATUS' · ×1
Unused module-local declaration 'STATUS' REDACTED:41— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Outdated: aho-corasick — `aho-corasick` is locked at 1.1.4 but 1.1.5 is the current stable release on crates.io, and it already satisfies the `"1.1.3"` requirement declared in src/daft-functions-utf8/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aho-corasick` and commit the updated REDACTED.
Outdated: arc-swap — `arc-swap` is locked at 1.9.0 but 1.9.5 is the current stable release on crates.io, and it already satisfies the `"1.7.1"` requirement declared in src/daft-local-execution/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arc-swap` and commit the updated REDACTED.
Outdated: async-compression — `async-compression` is locked at 0.4.43 but 0.4.52 is the current stable release on crates.io, and it already satisfies the `"0.4.43"` requirement declared in src/daft-compression/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-compression` and commit the updated REDACTED.
Outdated: async-recursion — `async-recursion` is locked at 1.1.1 but 1.2.0 is the current stable release on crates.io, and it already satisfies the `"1.0.4"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-recursion` and commit the updated REDACTED.
Outdated: async-trait — `async-trait` is locked at 0.1.89 but 0.1.92 is the current stable release on crates.io, and it already satisfies the `"0.1.89"` requirement declared in src/daft-checkpoint/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-trait` and commit the updated REDACTED.
Outdated: aws-config — `aws-config` is locked at 1.12.0 but 1.13.2 is the current stable release on crates.io, and it already satisfies the `"1.12.0"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-config` and commit the updated REDACTED.
Outdated: aws-credential-types — `aws-credential-types` is locked at 1.3.0 but 1.3.1 is the current stable release on crates.io, and it already satisfies the `"1.2.7"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-credential-types` and commit the updated REDACTED.
Outdated: aws-sdk-s3 — `aws-sdk-s3` is locked at 1.152.0 but 1.159.0 is the current stable release on crates.io, and it already satisfies the `"1.152.0"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-sdk-s3` and commit the updated REDACTED.
Outdated: aws-smithy-http-client — `aws-smithy-http-client` is locked at 1.5.0 but 1.5.2 is the current stable release on crates.io, and it already satisfies the `"1.1.2"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-smithy-http-client` and commit the updated REDACTED.
Outdated: aws-smithy-runtime-api — `aws-smithy-runtime-api` is locked at 1.19.0 but 1.21.0 is the current stable release on crates.io, and it already satisfies the `"1.8.0"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-smithy-runtime-api` and commit the updated REDACTED.
Outdated: axum — `axum` is locked at 0.8.8 but 0.8.9 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in src/daft-dashboard/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p axum` and commit the updated REDACTED.
Outdated: bytemuck — `bytemuck` is locked at 1.25.0 but 1.25.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src/daft-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytemuck` and commit the updated REDACTED.
Outdated: bytes — `bytes` is locked at 1.11.1 but 1.12.1 is the current stable release on crates.io, and it already satisfies the `"1.11.0"` requirement declared in src/daft-avro/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytes` and commit the updated REDACTED.
Outdated: chrono — `chrono` is locked at 0.4.44 but 0.4.45 is the current stable release on crates.io, and it already satisfies the `"0.4.38"` requirement declared in src/daft-checkpoint/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p chrono` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.6.0 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.5"` requirement declared in src/daft-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: console — `console` is locked at 0.16.3 but 0.16.6 is the current stable release on crates.io, and it already satisfies the `"0.16"` requirement declared in src/daft-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p console` and commit the updated REDACTED.
Outdated: educe — `educe` is locked at 0.8.1 but 0.8.2 is the current stable release on crates.io, and it already satisfies the `"^0.8"` requirement declared in src/daft-logical-plan/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p educe` and commit the updated REDACTED.
Outdated: either — `either` is locked at 1.15.0 but 1.19.0 is the current stable release on crates.io, and it already satisfies the `"1.9"` requirement declared in src/daft-scan/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p either` and commit the updated REDACTED.
Outdated: fast-float2 — `fast-float2` is locked at 0.2.3 but 0.2.4 is the current stable release on crates.io, and it already satisfies the `"0.2.3"` requirement declared in src/daft-decoding/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fast-float2` and commit the updated REDACTED.
Outdated: fastrand — `fastrand` is locked at 2.3.0 but 2.5.0 is the current stable release on crates.io, and it already satisfies the `"2.1.0"` requirement declared in src/daft-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fastrand` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.9 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in src/daft-functions-binary/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: futures — `futures` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3.30"` requirement declared in src/daft-avro/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
Outdated: globset — `globset` is locked at 0.4.18 but 0.4.21 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in src/daft-io/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p globset` and commit the updated REDACTED.
Outdated: indexmap — `indexmap` is locked at 2.14.0 but 2.14.2 is the current stable release on crates.io, and it already satisfies the `"2.14"` requirement declared in src/daft-algebra/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indexmap` and commit the updated REDACTED.
Outdated: indicatif — `indicatif` is locked at 0.18.4 but 0.18.6 is the current stable release on crates.io, and it already satisfies the `"0.18"` requirement declared in src/daft-local-execution/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indicatif` and commit the updated REDACTED.
Off the main sequence: common-hashable-float-wrapper — common-hashable-float-wrapper: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-logging — common-logging: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-py-serde — common-py-serde: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-system-info — common-system-info: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-runtime — common-runtime: abstractness 0.00, instability 0.04, distance 0.96 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-io-config — common-io-config: abstractness 0.03, instability 0.15, distance 0.81 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-daft-config — common-daft-config: abstractness 0.00, instability 0.20, distance 0.80 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-metrics — common-metrics: abstractness 0.09, instability 0.11, distance 0.80 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-tracing — common-tracing: abstractness 0.00, instability 0.25, distance 0.75 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: common-checkpoint-config — common-checkpoint-config: abstractness 0.00, instability 0.29, distance 0.71 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) — `src/daft-dashboard/frontend/tailwind.config.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a1db62-435b-7679-b87e-93d3ec35c3de · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 275 · Warnings: 2034 · Recommendations: 312 · Info: 60 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 18:46 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.