MCPcopy Create free account
hub / github.com/apache/cloudberry / assign_query_collations

Function assign_query_collations

src/backend/parser/parse_collate.c:100–114  ·  view source on GitHub ↗

* assign_query_collations() * Mark all expressions in the given Query with collation information. * * This should be applied to each Query after completion of parse analysis * for expressions. Note that we do not recurse into sub-Queries, since * those should have been processed when built. */

Source from the content-addressed store, hash-verified

98 * those should have been processed when built.
99 */
100void
101assign_query_collations(ParseState *pstate, Query *query)
102{
103 /*
104 * We just use query_tree_walker() to visit all the contained expressions.
105 * We can skip the rangetable and CTE subqueries, though, since RTEs and
106 * subqueries had better have been processed already (else Vars referring
107 * to them would not get created with the right collation).
108 */
109 (void) query_tree_walker(query,
110 assign_query_collations_walker,
111 (void *) pstate,
112 QTW_IGNORE_RANGE_TABLE |
113 QTW_IGNORE_CTE_SUBQUERIES);
114}
115
116/*
117 * Walker for assign_query_collations

Callers 8

transformDeleteStmtFunction · 0.85
transformInsertStmtFunction · 0.85
transformSelectStmtFunction · 0.85
transformValuesClauseFunction · 0.85
transformReturnStmtFunction · 0.85
transformUpdateStmtFunction · 0.85
transformPLAssignStmtFunction · 0.85

Calls 1

query_tree_walkerFunction · 0.85

Tested by

no test coverage detected