[
https://issues.apache.org/jira/browse/SPARK-57559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Max Gekk resolved SPARK-57559.
------------------------------
Resolution: Won't Do
Resolving as Won't Do.
On the current branch, TimeType already maps to PhysicalLongType through the
TypeOps framework: PhysicalDataType.apply consults TypeOps(dt) before the
legacy applyDefault match, and TimeTypeOps.getPhysicalType returns
PhysicalLongType. As a result, PhysicalDataType(TimeType(p)) already returns
PhysicalLongType for every precision and never falls through to
UninitializedPhysicalType.
The premise of this sub-task (TIME falling through to
UninitializedPhysicalType) is therefore obsolete. Adding an explicit 'case _:
TimeType => PhysicalLongType' to PhysicalDataType.applyDefault would be
unreachable dead code and would contradict the documented design that TypeOps
is the single registration point for new types. Physical-type consumers
(ColumnType, ColumnAccessor, GenerateColumnAccessor, the Long-based compression
schemes, and codegen) already handle TIME via the Long path.
No code change is warranted, so closing this sub-task as Won't Do.
> Add a TimeType case to PhysicalDataType
> ---------------------------------------
>
> Key: SPARK-57559
> URL: https://issues.apache.org/jira/browse/SPARK-57559
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 4.3.0
> Reporter: Max Gekk
> Priority: Major
>
> h2. What
> Add an explicit {{TimeType}} branch to {{PhysicalDataType.apply}} so TIME
> maps to
> {{PhysicalLongType}} instead of falling through to
> {{UninitializedPhysicalType}}.
> h2. Why
> {{PhysicalDataType.apply}} has no {{TimeType}} case. Ordering/comparison
> currently work via
> {{AtomicType}} + {{OrderUtils}} and the {{Long}} storage in column vectors,
> but the missing
> case is a latent inconsistency relative to TIMESTAMP/DATE and may surface in
> physical-type
> driven code paths.
> h2. Scope
> * Add {{case _: TimeType => PhysicalLongType}} (or equivalent) in
> {{PhysicalDataType}}.
> * Audit call sites that switch on {{PhysicalDataType}} to confirm TIME is
> handled.
> h2. Acceptance criteria
> * {{PhysicalDataType(TimeType(p))}} returns the long physical type for all p.
> * No behavior regressions; covered by a unit test.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]