enceladus icon indicating copy to clipboard operation
enceladus copied to clipboard

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

Open benedeki opened this issue 6 years ago • 2 comments

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

This needs to work properly

Additional context

The reason is that the quote characters are counted in when 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 #466

benedeki avatar Jul 17 '19 07:07 benedeki

Check comments for TODO #677 (affects 3 files currently)

GeorgiChochov avatar Sep 17 '19 09:09 GeorgiChochov

May be solved by https://github.com/AbsaOSS/spark-data-standardization/issues/7

dk1844 avatar Dec 08 '21 14:12 dk1844