AbsaOSS / AbsaOSS/cobrix

COMP-3 byte calculation is not working as expected

Abierto
#486 5 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Scala
Estrellas
170
Forks
96
Merge medio
57 min
PR fusionados (30 d)
2

Descripción

## Describe the bug
COMP-3 byte calculation is not working as expected. If COMP-3 is provided in parent field, then total bytes will be the sum(child bytes)/2 + 1. But in cobrix, the logic is applied to child level which increases the bytes size.
## Code snippet that caused the issue

```
spark.read
.format("cobol")
```

## Expected behavior
A clear and concise description of what you expected to happen.

## Context
- Cobrix version:
- Spark version:
- Scala version:
- Operating system:

## Copybook (if possible)
```
01 RECORD.
05 FIELD1 COMP-3.
07 COL-1 PIC S9(7)
07 COL-2 PIC S9(7)
07 COL-3 PIC S9(7)
```

Here expected bytes = ((7+7+7)/2) +1= 11.
But as per cobrix ((7/2)+1)+((7/2)+1)+((7/2)+1) = 12
@yruslan

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.