-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HAWQ-927. Pass ProjectionInfo data to PXF #796
Conversation
@@ -158,6 +165,29 @@ static void add_tuple_desc_httpheader(CHURL_HEADERS headers, Relation rel) | |||
pfree(formatter.data); | |||
} | |||
|
|||
static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo *projInfo) { | |||
int i; | |||
char long_number[32]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 32?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are converting list_length(projInfo->pi_targetlist)
, we need an array thats 32 chars long to match the bit length of int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try something like:
char long_number[(sizeof int) * 8];
Please review @xunzhang @paul-guo- @huor |
I don't think u need more than 10 bytes for long_number to store a long int. |
external_getnext_init(PlanState *state) { | ||
ExternalSelectDesc desc = (ExternalSelectDesc) palloc0(sizeof(ExternalSelectDescData)); | ||
if (state != NULL && state->ps_ProjInfo != NULL) { | ||
desc->projInfo = state->ps_ProjInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second condition is redundant
LGTM. Remember rebasing the commits before checking in. 🍺 |
This commit makes the necessary modifications to the HAWQ side of the codebase to add a list of indices of projected columns
+1 |
This commit makes the necessary modifications to the HAWQ side of
the codebase to add a list of indices of projected columns