Skip to content

chore: Deprecate usage of paste crate#20946

Open
coderfender wants to merge 3 commits intoapache:mainfrom
coderfender:deprecate_paste_module
Open

chore: Deprecate usage of paste crate#20946
coderfender wants to merge 3 commits intoapache:mainfrom
coderfender:deprecate_paste_module

Conversation

@coderfender
Copy link

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates core Core DataFusion crate functions Changes to functions implementation labels Mar 14, 2026
@coderfender
Copy link
Author

TODO : Deprecate paste crate usage in error.rs

@github-actions github-actions bot added the common Related to common crate label Mar 14, 2026
@coderfender coderfender force-pushed the deprecate_paste_module branch from d3b8705 to 3fd56d0 Compare March 14, 2026 17:12
@coderfender coderfender marked this pull request as ready for review March 14, 2026 17:12
@coderfender coderfender changed the title chore : deprecate_paste_crate chore: deprecate_paste_crate Mar 14, 2026
@coderfender
Copy link
Author

@martin-g , ready for your review

@coderfender
Copy link
Author

coderfender commented Mar 14, 2026

@comphead , I took the more laborious approach to remove paste crate and replace the macro defs with elaborated arguments than trying to find a new crate. Almost all other past crate usage is in tests / non critical path of code with one major usage in UDWF and Error macros

@coderfender coderfender changed the title chore: deprecate_paste_crate chore: Deprecate usage of paste crate Mar 14, 2026
@coderfender coderfender force-pushed the deprecate_paste_module branch from 3fd56d0 to 1e54eeb Compare March 14, 2026 17:50
@coderfender
Copy link
Author

Fixed a typo simple_udfw instead of simple_udwf

/// Macro wraps `$ERR` to add backtrace feature
#[macro_export]
macro_rules! $NAME_DF_ERR {
($d($d args:expr),* $d(; diagnostic=$d DIAG:expr)?) => {{
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
($d($d args:expr),* $d(; diagnostic=$d DIAG:expr)?) => {{
($d($d args:expr),* $d(; diagnostic = $d DIAG:expr)?) => {{

for consistency with the other macros

@coderfender
Copy link
Author

Thank you for the review @martin-g . Fixed the typo with udfw in the docs aignature and fixed macro signature docs per review comments. Take a look whenever you get a chance . Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate core Core DataFusion crate functions Changes to functions implementation logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates sql SQL Planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove paste crate from the project

2 participants