Open res-life opened 10 months ago
Is your feature request related to a problem? Please describe. This is from https://github.com/NVIDIA/spark-rapids/issues/6846 Needs a kernel to parse dates and timestamps with timezone IDs in the string
Math.addExact
def instantToMicros(instant: Instant): Long = { val secs = instant.getEpochSecond if (secs == MIN_SECONDS) { val us = Math.multiplyExact(secs + 1, MICROS_PER_SECOND) Math.addExact(us, NANOSECONDS.toMicros(instant.getNano) - MICROS_PER_SECOND) } else { val us = Math.multiplyExact(secs, MICROS_PER_SECOND) Math.addExact(us, NANOSECONDS.toMicros(instant.getNano)) } }
Alfred is co-working on this.
I'm not planing work on this for release 24.04 @sameerz can we move it to next release?
Is your feature request related to a problem? Please describe. This is from https://github.com/NVIDIA/spark-rapids/issues/6846 Needs a kernel to parse dates and timestamps with timezone IDs in the string
Math.addExact
to check overflow: