Skip to content
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

Reduce function calls to var's during requested column computation #112

Merged
merged 1 commit into from Aug 25, 2016

Conversation

mtuncer
Copy link
Member

@mtuncer mtuncer commented Jul 25, 2016

Postgresql does not reduce some function calls in target list when used in union all queries. This change uses pull_var_clause() to detect Var's used in target list when detecting which columns should be returned for the query on cstore table.

Fixes #107 and #95

@byucesoy
Copy link

We should change function's comment which says; "This function is unchanged from mongo_fdw."

It is not related with this change but here we have nested loop over columns of the table. It could be bottleneck when column count is high. We can remove duplicates with one loop and having a bool array or set to mark already added columns. It is up to you to decide if it is worth to effort.

@byucesoy
Copy link

I am not sure but is it possible to test new behavior?

@mtuncer
Copy link
Member Author

mtuncer commented Aug 22, 2016

Added user reported issue as test case

@byucesoy
Copy link

Looks good 🚢

@mtuncer mtuncer merged commit 1167f2f into develop Aug 25, 2016
@mtuncer mtuncer deleted the fix_95_non_var_target_list branch August 25, 2016 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants