Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into rebase_multifile_me…
Browse files Browse the repository at this point in the history
…rge_fix
  • Loading branch information
za-arthur committed Jul 31, 2024
2 parents 993ddd4 + e6afbfd commit 88dec77
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pg: [15, 14, 13, 12, 11, 10]
pg: [16, 15, 14, 13, 12, 11, 10]
ccflags: ['']
include:
- pg: 13
Expand Down
2 changes: 1 addition & 1 deletion src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exc_palloc(std::size_t size)
void *ret;
MemoryContext context = CurrentMemoryContext;

AssertArg(MemoryContextIsValid(context));
Assert(MemoryContextIsValid(context));

if (!AllocSizeIsValid(size))
throw std::bad_alloc();
Expand Down
21 changes: 17 additions & 4 deletions src/parquet_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ convert_const(Const *c, Oid dst_oid)
getTypeOutputInfo(c->consttype, &output_fn, &isvarlena);
getTypeInputInfo(dst_oid, &input_fn, &input_param);

str = DatumGetCString(OidOutputFunctionCall(output_fn,
c->constvalue));
str = OidOutputFunctionCall(output_fn, c->constvalue);
newc->constvalue = OidInputFunctionCall(input_fn, str,
input_param, 0);

Expand Down Expand Up @@ -941,9 +940,13 @@ OidFunctionCall1NullableArg(Oid functionId, Datum arg, bool argisnull)
static List *
get_filenames_from_userfunc(const char *funcname, const char *funcarg)
{
#if PG_VERSION_NUM >= 160000
List *f = stringToQualifiedNameList(funcname, NULL);
#else
List *f = stringToQualifiedNameList(funcname);
#endif
Jsonb *j = NULL;
Oid funcid;
List *f = stringToQualifiedNameList(funcname);
Datum filenames;
Oid jsonboid = JSONBOID;
Datum *values;
Expand Down Expand Up @@ -1263,9 +1266,15 @@ parquetGetForeignPaths(PlannerInfo *root,
NULL);

/* Create PathKey for the attribute from "sorted" option */
#if PG_VERSION_NUM >= 160000
attr_pathkeys = build_expression_pathkey(root, (Expr *) var,
sort_op, baserel->relids,
false);
#else
attr_pathkeys = build_expression_pathkey(root, (Expr *) var, NULL,
sort_op, baserel->relids,
false);
#endif

if (attr_pathkeys == NIL)
break;
Expand Down Expand Up @@ -2097,8 +2106,12 @@ parquet_fdw_validator_impl(PG_FUNCTION_ARGS)
}
else if (strcmp(def->defname, "files_func") == 0)
{
#if PG_VERSION_NUM >= 160000
List *funcname = stringToQualifiedNameList(defGetString(def), NULL);
#else
List *funcname = stringToQualifiedNameList(defGetString(def));
#endif
Oid jsonboid = JSONBOID;
List *funcname = stringToQualifiedNameList(defGetString(def));
Oid funcoid;
Oid rettype;

Expand Down

0 comments on commit 88dec77

Please sign in to comment.