AbsaOSS / AbsaOSS/enceladus

Prevent parsing udf double evaluation

Open
#1,028 0 comments 0 reactions 0 assignees View on GitHub
bug priority: undecided refactoring Standardization
Dominant language
Scala
Stars
33
Forks
16
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug
In `TypeParser` when calling a udf for parsing evaluates it twice for every input. Ones for the actual value and second time for the possibly existing error.
The udf actually returns a struct of both values.
For improved performance it would be better to return the struct from `TypeParser` and decompose it only later in `StandardizationInterpreter` avoiding the udf double evaluation

## To Reproduce
Steps to reproduce the behavior OR commands run:
1. Any logic leaded to use of Udf in `TypeParser`, for example parsing numbers based on pattern.

## Expected behaviour
Effective usage of udf

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.