Skip to content

Commit

Permalink
Issue #84: MemSet ParquetFdwPlanState before using (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur authored Jun 3, 2024
1 parent d1c43db commit 794932c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/parquet_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ get_table_options(Oid relid, ParquetFdwPlanState *fdw_private)
char *funcname = NULL;
char *funcarg = NULL;

fdw_private->filenames = NIL;
fdw_private->attrs_sorted = NIL;
fdw_private->use_mmap = false;
fdw_private->use_threads = false;
fdw_private->max_open_files = 0;
Expand Down Expand Up @@ -1677,6 +1679,7 @@ parquetAcquireSampleRowsFunc(Relation relation, int /* elevel */,
ListCell *lc;
std::string error;

MemSet(&fdw_private, 0, sizeof(fdw_private));
get_table_options(RelationGetRelid(relation), &fdw_private);

for (int i = 0; i < tupleDesc->natts; ++i)
Expand Down

0 comments on commit 794932c

Please sign in to comment.