Skip to content

return value out of range #15

Description

@maddin200

/src/backend/utils/adt/agtype_util.c line 1536 Non-boolean value returned from function returning bool
static bool equals_agtype_scalar_value(agtype_value *a, agtype_value *b)
{
if (a->type == b->type)
{
switch (a->type)
{
case AGTV_NULL:
return true;
case AGTV_STRING:
return length_compare_agtype_string_value(a, b) == 0;
case AGTV_NUMERIC:
return DatumGetBool(DirectFunctionCall2(
numeric_eq, PointerGetDatum(a->val.numeric),
PointerGetDatum(b->val.numeric)));
case AGTV_BOOL:
return a->val.boolean == b->val.boolean;
case AGTV_INTEGER:
return a->val.int_value == b->val.int_value;
case AGTV_FLOAT:
return a->val.float_value == b->val.float_value;
case AGTV_VERTEX:
{
graphid a_graphid, b_graphid;
a_graphid = a->val.object.pairs[0].value.val.int_value;
b_graphid = b->val.object.pairs[0].value.val.int_value;

        return a_graphid == b_graphid;
    }

    default:
        ereport(ERROR, (errmsg("invalid agtype scalar type %d for equals",
                               a->type)));
    }
}
ereport(ERROR, (errmsg("agtype input scalars must be of same type")));
return -1; // <- should be bool

}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions