forked from citusdata/mongo_fdw
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where casting target list produces 'NULL'.
To check which columns are needed to be output, we create a column list from the target list. However, we are only adding the plain Var nodes appearing in the target list. Thus, if a target list has an explicit casting, then it won't appear as a plain Var node and thus not added in the column list, resulting in returning NULL for them. Fix that by correctly pulling out the Vars from the expression appearing in the target list by using pull_var_clause(). This enables us to give a correct result even if we have expressions other than an explicit cast like a function call or operators. Reported on GitHub through issues #133 by Maksim Volkau (dadhi). FDW-197, Vaibhav Dalvi, reviewed by Suraj Kharage
- Loading branch information
1 parent
3571072
commit de5db6e
Showing
4 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters