chore: promote array_insert to compatible and consolidate expression docs#4065
Merged
andygrove merged 2 commits intoapache:mainfrom Apr 24, 2026
Merged
chore: promote array_insert to compatible and consolidate expression docs#4065andygrove merged 2 commits intoapache:mainfrom
andygrove merged 2 commits intoapache:mainfrom
Conversation
…docs Promote `array_insert` from `Incompatible` to `Compatible` based on the audit against Spark 3.4.3, 3.5.8, and 4.0.1. The only remaining difference is a cosmetic error-message mismatch when `pos=0`, which falls within the `Compatible` contract. Move `docs/spark_expressions_support.md` into the contributor guide and merge the separate expression audit log into it as per-version sub-bullets under each audited expression.
andygrove
commented
Apr 24, 2026
| object CometArrayInsert extends CometExpressionSerde[ArrayInsert] { | ||
|
|
||
| override def getSupportLevel(expr: ArrayInsert): SupportLevel = Incompatible(None) | ||
| override def getSupportLevel(expr: ArrayInsert): SupportLevel = Compatible() |
Member
Author
There was a problem hiding this comment.
I should have just removed the method, but don't want to wait for another CI run at this point. Will remove in a future PR along with others like this
comphead
reviewed
Apr 24, 2026
| | ArrayDistinct | Yes | | | ||
| | ArrayExcept | No | | | ||
| | ArrayFilter | Yes | Only supports case where function is `IsNotNull` | | ||
| | ArrayInsert | No | | |
Member
Author
|
Thanks @comphead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Part of #4050
Rationale for this change
The
array_insertexpression was previously markedIncompatible, requiringspark.comet.expr.allowIncompatible=trueto use. A recent audit against Spark 3.4.3, 3.5.8, and 4.0.1 found no behavioral differences beyond a cosmetic error-message mismatch whenpos=0(Comet throws a generic error while Spark raisesINVALID_INDEX_OF_ZERO). That falls within theCompatiblecontract ("may have known differences in some specific edge cases that are unlikely to be an issue for most users"), so users no longer need to opt in to incompatible expressions for this function.The expression audit log has also accumulated a single entry and lives in its own file. Folding that metadata into the main expression support doc keeps audit findings next to the coverage matrix, and moving that doc into the contributor guide makes it discoverable through the Sphinx toctree.
What changes are included in this PR?
CometArrayInsert.getSupportLevelfromIncompatible(None)toCompatible().docs/spark_expressions_support.mdintodocs/source/contributor-guide/and add it to the contributor-guide toctree.expression-audit-log.mdcontents into the support doc as per-version sub-bullets underarray_insert, then delete the audit log.audit-comet-expressionskill andadding_a_new_expression.mdlink to point at the new location.How are these changes tested?
Covered by existing
array_inserttests added during the audit. No new behavior is introduced; this PR only relaxes the support-level gate and reorganizes docs.