AbsaOSS / AbsaOSS/spark-data-standardization

If Timestamp/Date pattern contains both literal or variable length entry and fractions of second placeholders it's likely to cause error

Abierto
#7 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Scala
Estrellas
7
Forks
2
Merge medio
1 d 18 h
PR fusionados (30 d)
4

Descripción

_This issue is a shortcut for https://github.com/AbsaOSS/enceladus/issues/677 (moving it from Enceladus to here)_

## Describe the bug
If Timestamp/Date pattern contains both literal parts or variable length entry (month name, day name, ...) and fractions of second placeholders namely if any literal part is before any second fraction placeholder it will fail _Standardization_ of such filed or even crash with an exception.

## To Reproduce
Steps to reproduce the behavior OR commands run:
1. Set the timestamp pattern to `"'at' HH:mm:ss.SSS"`
2. Try to _Standardize_ or just use 'EnceladusDateTimeParser.format'
3. Exception, wouldn't it be `SSS` be at the tail it would "just" fail the conversion in _Standardization_

## Expected behavior
This needs to work properly

# Additional context
The reason is that the quote characters are counted in when the position of second fractions are analyzed. But in the actual string to convert they are not present making the index out of place, even outside the boundaries.

Related to https://github.com/AbsaOSS/enceladus/issues/466

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.