Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-2611] TMUDF with input parameters returns wrong answer #1092

Merged
merged 3 commits into from May 17, 2017
Merged

[TRAFODION-2611] TMUDF with input parameters returns wrong answer #1092

merged 3 commits into from May 17, 2017

Conversation

zellerh
Copy link
Contributor

@zellerh zellerh commented May 11, 2017

Also fixes for two more JIRAs:

[TRAFODION-2612] Internal error in CLEANUP in rare cases
[TRAFODION-2615] TMUDF returns wrong results with small numeric inputs

These three fixes are independent, so I would recommend reviewing each of the three commits separately.

Error in internal SQL issued by CLEANUP caused a piece of memory
to be deallocated twice, resulting in an assertion failure.
When a TMUDF had a query with an input parameter or a CURRENT_TIMESTAMP
(or CURRENT_DATE, CURRENT_TIME) in it, we sometimes return incorrect
values.

The problem was that these values were not set up correctly in the
dataflow and they were not shipped as characteristic inputs to the
operators that were referring to them.
The problem is that the new TINYINT type sometimes is stored in 1
byte, other times in 2 bytes. The TMUDF code makes the assumption that
we can compute the storage size from the precision. The fix is
in the binder and makes sure the storage size matches the storage size
that the TMUDF code will compute.
@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1794/

Copy link
Contributor

@DaveBirdsall DaveBirdsall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 All three fixes look good to me.

@Traf-Jenkins
Copy link

@asfgit asfgit merged commit d4677b5 into apache:master May 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants