AbsaOSS / AbsaOSS/cobrix

COMP-3 byte calculation is not working as expected

未關閉
#486 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Scala
星號
170
分支
96
平均合併
57 分鐘
30 天內合併 PR
2

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。