SEZ9 commented on issue #13361:
URL: https://github.com/apache/seatunnel/issues/13361#issuecomment-7069431246

   @hutiefang76 thanks for running the `TIME` case and the boundary-only 
experiment. Your comment didn't ask a question, so here is where I land on both 
results.
   
   **`TIME`**: this is not the failure reported here. As you observed, the 
converter represents `TIME` as milliseconds since midnight, and both the 
projection and the one-second interval complete without the cast error. Please 
keep `TIME` out of this fix.
   
   **Epoch-millisecond conversion for `TIMESTAMP` / `TIMESTAMP_TZ`**: your 
experiment rules this out as the fix. It removes the `ClassCastException`, but 
`.123456` becomes `.123`. Your follow-up at `7029c096` shows the consequence: 
`a = b` returns the row incorrectly, while `a <> b` and `a < b` drop it, for 
values within the same millisecond. That replaces a visible exception with 
silently wrong results, so please do not submit that conversion.
   
   What I need before a behavior-changing PR:
   
   - **Proposal or prototype**: identify a Calcite physical representation and 
adapter path that carries six fractional digits through standalone projection, 
comparison, and whole-second interval arithmetic, for both `TIMESTAMP` and 
`TIMESTAMP_TZ`.
   - **If Calcite cannot do this**: say so explicitly in the proposal, given 
the runtime precision limit you linked (CALCITE-5266), so we can resolve that 
first rather than round precision down.
   - **Fix boundary**: keep the change in the Calcite adapter/type boundary in 
`seatunnel-transforms-v2`, with the existing SeaTunnel timestamp types and 
connector APIs unchanged.
   
   For the eventual regression tests, please cover:
   
   - both timestamp types;
   - standalone projection and interval arithmetic;
   - equality, inequality, and ordering;
   - null controls;
   - distinct values within the same millisecond.
   
   A direct-engine test plus the `FakeSource -> Calcite -> Console` job is 
enough for the first PR. The MySQL CDC snapshot/binlog check remains optional 
follow-up evidence.
   
   <!-- streview-comment:2503 -->


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