fudianchn commented on PR #39613:
URL: https://github.com/apache/shardingsphere/pull/39613#issuecomment-5844264532

   Addressed in 7a181678.
   
   The client-visible layout no longer discards labels by derived-name prefix. 
Columns appended by the rewrite are now identified from the projections context 
itself: the derived aliases it actually produces (`ORDER_BY_DERIVED_*` / 
`GROUP_BY_DERIVED_*` appended projections and `AVG_DERIVED_*` derived 
aggregations) and how many there are. Only that many trailing columns whose 
labels match those aliases are hidden, matching how 
ShardingProjectionsTokenGenerator appends the derived block after the 
projections stop position. A real selected column named `ORDER_BY_DERIVED_9` 
therefore stays visible, in both the expanded and the fallback layouts.
   
   The test that asserted removal of a real column with this prefix now asserts 
it is kept, and five older tests were re-modelled to include the 
DerivedProjection instances the binder appends when the rewrite adds those 
columns. New regressions cover the multi-route no-drift and schema-drift cases 
(`SELECT order_id, ORDER_BY_DERIVED_9 FROM t_order ORDER BY sort_key` with an 
appended `ORDER_BY_DERIVED_0`) across JDBC metadata, Proxy query headers, and 
MySQL prepare.
   
   Verification: the six new tests fail on the previous head and pass on 
7a181678; a mutation that strips matching labels anywhere without the 
trailing-block and count bounds is killed by the collision test and the 
reconciliation-budget test; jdbc 1260, proxy/backend/core 585, 
proxy/frontend/dialect/mysql 202, all green; spotless:check and 
checkstyle:check pass on the three modules.
   


-- 
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