eugenegujing opened a new pull request, #7767:
URL: https://github.com/apache/texera/pull/7767

   ### What changes were proposed in this PR?
   
   The Projection operator's "Drop Option" (`isDrop`) inverts what the operator 
does: with it on, the listed attributes are removed and every other attribute 
is kept under its original name, with aliases ignored. Both the runtime tuple 
rewrite (`ProjectionOpExec`) and the compile-time output-schema derivation 
(`ProjectionOpDesc`) branch on this flag, but all 19 existing Projection tests 
leave it at its `false` default, so the entire drop half ran uncovered.
   
   This PR adds 14 tests, all with `isDrop = true`, and changes no production 
code. `ProjectionOpExecSpec` gains 8 tests: dropping one and multiple 
attributes, aliases being ignored, dropping a non-existent attribute, dropping 
every attribute, exec output matching the descriptor-derived schema for the 
same config, case-sensitive name matching, and duplicate drop entries. 
`ProjectionOpDescSpec` gains 6 mirror tests on the schema-derivation side: 
remaining names/types/order, aliases ignored, non-existent attribute, dropping 
everything, case-insensitive matching, and duplicate entries.
   
   The degenerate-case tests pin three exec-vs-descriptor asymmetries as they 
exist today rather than fixing them, since unifying them is a behavior decision 
for a separate issue: unknown names (the exec's `diff`-based rewrite silently 
ignores them, `Schema.remove` throws `IllegalArgumentException`), case handling 
(the exec matches exactly and keeps a column the descriptor-derived schema says 
was dropped, with no error on either side), and duplicate entries (the exec 
tolerates them, the descriptor throws). Each side's test carries a comment 
pointing at the other side of the asymmetry.
   
   ### Any related issues, documentation, discussions?
   
   Resolves #7765
   
   ### How was this PR tested?
   
   This PR is test-only. Both suites pass locally: `sbt 
"WorkflowOperator/testOnly *ProjectionOpExecSpec *ProjectionOpDescSpec"` runs 
33 tests (19 pre-existing + 14 new), all green, and 
`WorkflowOperator/Test/scalafmtCheck` passes. The full `WorkflowOperator/test` 
suite was also run locally to confirm the new tests introduce no cross-test 
interference.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Fable 5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to