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

   ### What changes were proposed in this PR?
   
   The operator marked the last input row as the chart's total bar. Plotly 
draws a total at the accumulated sum of the bars before it and ignores the 
value given for that row, so the last row's value was never plotted while its 
data label still showed that value. Four rows of 1, 2, 3 and 4 gave three bars 
and a fourth drawn at 6 and labelled +4. Nothing in the operator asks for a 
summary row: the two fields are a category column and a value column, and there 
is no option controlling whether a total is drawn.
   
   Every input row is now a relative bar, and the total is an extra bar that 
plotly accumulates, so no row is consumed and the total covers the whole 
column. The x axis is pinned to categories, which keeps the bars in input 
order, the order the running total is computed in. Before this an unsorted 
numeric x column was laid out by value while the measure list stayed 
positional, which could put the total bar in the middle of the chart with 
ordinary increasing bars to its right.
   
   Both generated paths change together.
   
   <!-- before/after screenshot -->
   
   ### Any related issues, documentation, discussions?
   
   Closes #7974
   
   ### How was this PR tested?
   
   Three cases were added to the operator's own spec. Two read the generated 
code from both paths and check that the measure list covers every row and that 
the total is appended. The third executes the generated module against a four 
row table of 1, 2, 3 and 4 and reads back the trace plotly receives, so it 
fails on the measure list alone: it asserts five bars, an appended Total 
category, and the labels +1, +2, +3, +4 and 10. A second table in the same 
driver holds an unsorted numeric x column of 30, 10 and 20 and asserts the bars 
keep that order.
   
   The operator's parity verification was run as well and passes.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 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