Skip to content

chore: refactor cast module numeric data types#3623

Merged
parthchandra merged 4 commits intoapache:mainfrom
coderfender:refactor_cast_module_numeric
Mar 3, 2026
Merged

chore: refactor cast module numeric data types#3623
parthchandra merged 4 commits intoapache:mainfrom
coderfender:refactor_cast_module_numeric

Conversation

@coderfender
Copy link
Contributor

@coderfender coderfender commented Mar 2, 2026

Which issue does this PR close?

Part of #3459 .

Rationale for this change

  1. Move numeric related(from numeric type) cast functions from cast.rs to numeric.rs to improve code organization.
  2. Introduced is_df_cast_from_int_spark_compatible , is_df_cast_from_float_spark_compatible ,is_df_cast_from_decimal_spark_compatible to port out DF supported casts to numeric.rs

What changes are included in this PR?

All numeric casts (casts from numeric int / decimal to other data types) are moved to a new file called numeric.rs.

How are these changes tested?

  1. Existing unit tests only since this is just code refactor PR

@coderfender
Copy link
Contributor Author

fixing merge conflicts

@coderfender coderfender force-pushed the refactor_cast_module_numeric branch 2 times, most recently from f95475f to 70953f8 Compare March 2, 2026 23:21
@coderfender coderfender force-pushed the refactor_cast_module_numeric branch from 70953f8 to 96b6b55 Compare March 2, 2026 23:41
@coderfender
Copy link
Contributor Author

@andygrove , @parthchandra This is the next part of the cast module refactor moving all (from) numeric based casts into a new file. Please take a look whenever you get a chance

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM pending CI. Thanks @coderfender

@coderfender
Copy link
Contributor Author

coderfender commented Mar 3, 2026

@andygrove , seems like there are some transient failures barring which CI looks good. Please rerun whenever you get a chance

@coderfender
Copy link
Contributor Author

@andygrove thank you for kicking off the CI . The tests pass now. Please merge this whenever you get a chance I will rebase #3624 and mark it ready for review

@parthchandra parthchandra merged commit 48e32a8 into apache:main Mar 3, 2026
110 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants