Skip to content

Comments

[WIP] feat: support binary lpad/rpad via StaticInvoke#3594

Draft
n0r0shi wants to merge 1 commit intoapache:mainfrom
n0r0shi:binary-pad-func
Draft

[WIP] feat: support binary lpad/rpad via StaticInvoke#3594
n0r0shi wants to merge 1 commit intoapache:mainfrom
n0r0shi:binary-pad-func

Conversation

@n0r0shi
Copy link

@n0r0shi n0r0shi commented Feb 25, 2026

Summary

  • Add Rust UDFs for Spark's ByteArray.lpad/ByteArray.rpad, triggered when calling lpad/rpad on binary columns
  • Left/right-pad binary arrays with a cyclic byte pattern, matching Spark's behavior
  • Wire via StaticInvoke handler in statics.scala with foldability checks: str must be a column (not literal), len and pad must be scalar
  • Update existing testBinaryPadding test expectations from fallback to native execution for supported cases

Add Rust UDFs for Spark's ByteArray.lpad/rpad (triggered when calling
lpad/rpad on binary columns):
- binary_lpad: left-pad binary array with cyclic byte pattern
- binary_rpad: right-pad binary array with cyclic byte pattern

Wire via StaticInvoke handler with foldability checks: str must be a
column (not literal), len and pad must be scalar.
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.

1 participant