@@ -70,8 +70,8 @@ CoerceSubscriptToText(struct ParseState *pstate, A_Indices *subscript, const cha
70
70
* See also comments on SubscriptingRef in nodes/subscripting.h
71
71
*/
72
72
void
73
- AddSubscriptExpressions (SubscriptingRef *sbsref, struct ParseState *pstate, A_Indices *subscript, bool isSlice ) {
74
- Assert (isSlice || subscript->uidx );
73
+ AddSubscriptExpressions (SubscriptingRef *sbsref, struct ParseState *pstate, A_Indices *subscript, bool is_slice ) {
74
+ Assert (is_slice || subscript->uidx );
75
75
76
76
Node *upper_subscript_expr = NULL ;
77
77
if (subscript->uidx ) {
@@ -80,7 +80,7 @@ AddSubscriptExpressions(SubscriptingRef *sbsref, struct ParseState *pstate, A_In
80
80
81
81
sbsref->refupperindexpr = lappend (sbsref->refupperindexpr , upper_subscript_expr);
82
82
83
- if (isSlice ) {
83
+ if (is_slice ) {
84
84
Node *lower_subscript_expr = NULL ;
85
85
if (subscript->uidx ) {
86
86
lower_subscript_expr = transformExpr (pstate, subscript->lidx , pstate->p_expr_kind );
@@ -96,8 +96,8 @@ AddSubscriptExpressions(SubscriptingRef *sbsref, struct ParseState *pstate, A_In
96
96
* subscript returns an an duckdb.unresolved_type again.
97
97
*/
98
98
void
99
- DuckdbSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice ,
100
- bool isAssignment , const char *type_name) {
99
+ DuckdbSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice ,
100
+ bool is_assignment , const char *type_name) {
101
101
/*
102
102
* We need to populate our cache for some of the code below. Normally this
103
103
* cache is populated at the start of our planner hook, but this function
@@ -107,7 +107,7 @@ DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct Pars
107
107
elog (ERROR, " BUG: Using %s but the pg_duckdb extension is not installed" , type_name);
108
108
}
109
109
110
- if (isAssignment ) {
110
+ if (is_assignment ) {
111
111
elog (ERROR, " Assignment to %s is not supported" , type_name);
112
112
}
113
113
@@ -117,7 +117,7 @@ DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct Pars
117
117
118
118
// Transform each subscript expression
119
119
foreach_node (A_Indices, subscript, indirection) {
120
- AddSubscriptExpressions (sbsref, pstate, subscript, isSlice );
120
+ AddSubscriptExpressions (sbsref, pstate, subscript, is_slice );
121
121
}
122
122
123
123
// Set the result type of the subscripting operation
@@ -136,8 +136,8 @@ DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct Pars
136
136
* Currently this is used for duckdb.row and duckdb.struct types.
137
137
*/
138
138
void
139
- DuckdbTextSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice ,
140
- bool isAssignment , const char *type_name) {
139
+ DuckdbTextSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice ,
140
+ bool is_assignment , const char *type_name) {
141
141
/*
142
142
* We need to populate our cache for some of the code below. Normally this
143
143
* cache is populated at the start of our planner hook, but this function
@@ -147,7 +147,7 @@ DuckdbTextSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct
147
147
elog (ERROR, " BUG: Using %s but the pg_duckdb extension is not installed" , type_name);
148
148
}
149
149
150
- if (isAssignment ) {
150
+ if (is_assignment ) {
151
151
elog (ERROR, " Assignment to %s is not supported" , type_name);
152
152
}
153
153
@@ -165,14 +165,14 @@ DuckdbTextSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct
165
165
if (first) {
166
166
sbsref->refupperindexpr =
167
167
lappend (sbsref->refupperindexpr , CoerceSubscriptToText (pstate, subscript, type_name));
168
- if (isSlice ) {
168
+ if (is_slice ) {
169
169
sbsref->reflowerindexpr = lappend (sbsref->reflowerindexpr , NULL );
170
170
}
171
171
first = false ;
172
172
continue ;
173
173
}
174
174
175
- AddSubscriptExpressions (sbsref, pstate, subscript, isSlice );
175
+ AddSubscriptExpressions (sbsref, pstate, subscript, is_slice );
176
176
}
177
177
178
178
// Set the result type of the subscripting operation
@@ -229,9 +229,9 @@ DuckdbSubscriptExecSetup(const SubscriptingRef * /*sbsref*/, SubscriptingRefStat
229
229
}
230
230
231
231
void
232
- DuckdbRowSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice ,
233
- bool isAssignment ) {
234
- DuckdbTextSubscriptTransform (sbsref, indirection, pstate, isSlice, isAssignment , " duckdb.row" );
232
+ DuckdbRowSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice ,
233
+ bool is_assignment ) {
234
+ DuckdbTextSubscriptTransform (sbsref, indirection, pstate, is_slice, is_assignment , " duckdb.row" );
235
235
}
236
236
237
237
void
@@ -250,8 +250,8 @@ static SubscriptRoutines duckdb_row_subscript_routines = {
250
250
251
251
void
252
252
DuckdbUnresolvedTypeSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate,
253
- bool isSlice , bool isAssignment ) {
254
- DuckdbSubscriptTransform (sbsref, indirection, pstate, isSlice, isAssignment , " duckdb.unresolved_type" );
253
+ bool is_slice , bool is_assignment ) {
254
+ DuckdbSubscriptTransform (sbsref, indirection, pstate, is_slice, is_assignment , " duckdb.unresolved_type" );
255
255
}
256
256
257
257
void
@@ -269,9 +269,9 @@ static SubscriptRoutines duckdb_unresolved_type_subscript_routines = {
269
269
};
270
270
271
271
void
272
- DuckdbStructSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice ,
273
- bool isAssignment ) {
274
- DuckdbTextSubscriptTransform (sbsref, indirection, pstate, isSlice, isAssignment , " duckdb.struct" );
272
+ DuckdbStructSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice ,
273
+ bool is_assignment ) {
274
+ DuckdbTextSubscriptTransform (sbsref, indirection, pstate, is_slice, is_assignment , " duckdb.struct" );
275
275
}
276
276
277
277
void
@@ -289,9 +289,9 @@ static SubscriptRoutines duckdb_struct_subscript_routines = {
289
289
};
290
290
291
291
void
292
- DuckdbMapSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice ,
293
- bool isAssignment ) {
294
- DuckdbSubscriptTransform (sbsref, indirection, pstate, isSlice, isAssignment , " duckdb.map" );
292
+ DuckdbMapSubscriptTransform (SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice ,
293
+ bool is_assignment ) {
294
+ DuckdbSubscriptTransform (sbsref, indirection, pstate, is_slice, is_assignment , " duckdb.map" );
295
295
}
296
296
297
297
void
0 commit comments