EnxDev commented on code in PR #45851:
URL: https://github.com/apache/superset/pull/45851#discussion_r4431282649
##########
superset/connectors/sqla/partition_mapping.py:
##########
@@ -1851,9 +1851,38 @@ def _evaluate_with_text_forms(
# text of every correct transform too -- `CAST(:value AS DATE)`
# cannot read '2026-01-12 06:30:00' under the default
# ``NLS_DATE_FORMAT`` -- so declining here cost Oracle every time
- # range. The typed values are asked alone, a second round trip only
+ # range. The typed values are asked again, a second round trip only
# on this path, and `_declined_for_reading_by_type` checks what they
# answer against the instants they were asked about instead.
+ #
+ # In that same round trip each instant is asked once more at the top
+ # of an hour, typed and as the shorter text `_as_hour_text` writes,
+ # which a mask too short for the full text still reads. Being near
+ # the instant is not enough on its own: under an ISO date-only
+ # ``NLS_DATE_FORMAT``, ``TO_DATE(:value, 'YYYY-MM-DD HH24')`` answers
+ # midnight for 06:30, which is near it and a whole hourly key out.
+ # Those two answers differ.
+ hours = [_at_probe_hour(values[index]) for index in indexes]
+ with_hours = evaluate_transform(
Review Comment:
When Oracle refuses the hour text this probe records `mirrors=False` through
`_run_probe`, like the combined one above, and the typed lookup below only
writes `True` back on a probe-cache miss. So from the second chart on the same
fixed range, the editor banner and Explore glyph say the mapping doesn't prune
while it does.
Not new with this PR, the combined probe already did it. Could the text-form
probes skip the verdict write and leave it to the typed call?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]