Skip to content

Commit

Permalink
Fix shadowed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur committed May 29, 2024
1 parent 46e680b commit 280313b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/parquet_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ parquetGetForeignPaths(PlannerInfo *root,
private_parallel_merge->type = private_parallel_merge->max_open_files > 0 ?
RT_CACHING_MULTI_MERGE : RT_MULTI_MERGE;

Path *path = (Path *)
path = (Path *)
create_foreignscan_path(root, baserel,
NULL, /* default pathtarget */
baserel->rows,
Expand All @@ -1386,7 +1386,7 @@ parquetGetForeignPaths(PlannerInfo *root,
NULL, /* no extra plan */
(List *) private_parallel_merge);

int num_workers = max_parallel_workers_per_gather;
num_workers = max_parallel_workers_per_gather;

cost_merge(path, list_length(private_parallel_merge->filenames),
startup_cost, total_cost, private_parallel_merge->matched_rows);
Expand Down Expand Up @@ -2029,30 +2029,30 @@ parquet_fdw_validator_impl(PG_FUNCTION_ARGS)
{
List *options_list = untransformRelOptions(PG_GETARG_DATUM(0));
Oid catalog = PG_GETARG_OID(1);
ListCell *lc;
ListCell *opt_lc;
bool filename_provided = false;
bool func_provided = false;

/* Only check table options */
if (catalog != ForeignTableRelationId)
PG_RETURN_VOID();

foreach(lc, options_list)
foreach(opt_lc, options_list)
{
DefElem *def = (DefElem *) lfirst(lc);
DefElem *def = (DefElem *) lfirst(opt_lc);

if (strcmp(def->defname, "filename") == 0)
{
char *filename = pstrdup(defGetString(def));
List *filenames;
ListCell *lc;
ListCell *file_lc;

filenames = parse_filenames_list(filename);

foreach(lc, filenames)
foreach(file_lc, filenames)
{
struct stat stat_buf;
char *fn = strVal(lfirst(lc));
char *fn = strVal(lfirst(file_lc));

if (stat(fn, &stat_buf) != 0)
{
Expand Down

0 comments on commit 280313b

Please sign in to comment.