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

[TRAFODION-2119] create table report strange WARNING when using store… #642

Merged
merged 2 commits into from
Aug 10, 2016

Conversation

moscowgentalman
Copy link
Contributor

… by and allow_nullable_unique_key_constraint CQD

… by and allow_nullable_unique_key_constraint CQD
@moscowgentalman
Copy link
Contributor Author

This PR must need extra test qat001 to pass

@Traf-Jenkins
Copy link

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

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor Author

Jenkins, extra tests

@Traf-Jenkins
Copy link

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

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor Author

moscowgentalman commented Aug 5, 2016

introduce new EXECUTOR/TEST015 failure, will try again and it passed in my workstation, so probably a transient glitch?
so try to test again.

@moscowgentalman
Copy link
Contributor Author

Jenkins, extra tests

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/ExtraTest-PR-master/49/

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor Author

Failure test case:
HIVE003
HIVE004
compGeneral 042

So it is identical with main branch failures, not introduced by this RP. From regression point of view, this PR is clean now.

if (type->supportsSQLnullPhysical())
{
Lng32 nullHdrSize = type->getSQLnullHdrSize();
for(int i = 0; i < nullHdrSize; i++)
Copy link
Contributor

Choose a reason for hiding this comment

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

Prior to this change what was being placed in the null bytes by this method? Is this change required for character type alone or for all types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prior to this change, the nullIndictor will be filled by 0 by accident, since the minimum value is 0. So it will fill in N zeros into the buffer starting from the null header.
I don't know if it is required for other type. This is a good question, let me check other type as well.
But in fact, this change is not necessary. Since the buf is never used in this function.

I will rework on this.

@Traf-Jenkins
Copy link

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

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor Author

jenkins, extra tests

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/ExtraTest-PR-master/51/

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor Author

failed at HIVE003 and HIVE 004 which this change doesn't touch. And these two tests fail in current main branch daily build as well.

Looking at these two failures, it seems they are temporary, if run enough times, they will PASS.

Anyway, this PR is passing all necessary regression and ready for merge if no other review comments.

thanks,
Ming

@sureshsubbiah
Copy link
Contributor

+1. Looks good to me. Will wait a day or so to see if there are additional comments before merging. Thank you fixing this intricate problem.

@DaveBirdsall
Copy link
Contributor

Looks good to me.

if (type->supportsSQLnullPhysical())
{
nullHdrSize = type->getSQLnullHdrSize();
for(int i = 0; i < nullHdrSize; i++)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not familiar with this part, but would it be more efficient to use memset() to do the initial work rather than using a for loop? Just my opinion...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are two issues to use memset() here, please keep in mind the nullHdrSize will be 2 or 4

  1. memset is good for large buffer initialization, because it will try to do 8 bytes copy in parallel and in memory alignment, but for small buffer , it is same as a while loop . It will also try to adjust memory alignment, which is useless for 2 or 4 bytes initialization, but just waste a few CPU cycle.
  2. memset will require a function call.

@asfgit asfgit merged commit 7ee17b2 into apache:master Aug 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants