Skip to content

Commit

Permalink
refactor: split and rename column_operation.rs (#343)
Browse files Browse the repository at this point in the history
Please be sure to look over the pull request guidelines here:
https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.

# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here:
https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md.
In particular `!` is used if and only if at least one breaking change
has been introduced.
- [x] I have run the ci check script with `source
scripts/run_ci_checks.sh`.

# Rationale for this change
`column_operation.rs` is incredibly long. It is time to split out
`ColumnType` manipulations as a separate file. Moreover since we will
most likely have a separate file for `Column` operations and that we
don't even use either `OwnedColumn` or `Column` in `column_operation.rs`
it is a misnomer and should be renamed `slice_operation.rs`.
Decimal-related code is long, has unusual dependencies and can't easily
be simplified hence they should be split into a separate file too.
<!--
Why are you proposing this change? If this is already explained clearly
in the linked issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.

 Example:
 Add `NestedLoopJoinExec`.
 Closes #345.

Since we added `HashJoinExec` in #323 it has been possible to do
provable inner joins. However performance is not satisfactory in some
cases. Hence we need to fix the problem by implement
`NestedLoopJoinExec` and speed up the code
 for `HashJoinExec`.
-->

# What changes are included in this PR?
- Move `ColumnType`-related code to `column_type_operation.rs`
- Move decimal-related slice manipulation code to
`slice_decimal_operation.rs`
- Rename the file to `slice_operation.rs`
<!--
There is no need to duplicate the description in the ticket here but it
is sometimes worth providing a summary of the individual changes in this
PR.

Example:
- Add `NestedLoopJoinExec`.
- Speed up `HashJoinExec`.
- Route joins to `NestedLoopJoinExec` if the outer input is sufficiently
small.
-->

# Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?

Example:
Yes.
-->
Existing tests should pass
  • Loading branch information
iajoiner authored Nov 7, 2024
2 parents eadf744 + 4f4d146 commit 883384b
Show file tree
Hide file tree
Showing 5 changed files with 1,407 additions and 1,384 deletions.
Loading

0 comments on commit 883384b

Please sign in to comment.