jrgemignani commented on issue #15:
URL: https://github.com/apache/incubator-age/issues/15#issuecomment-768466839


   Hi Martin,
   
   I'm assuming this generated an error for you on compile? Which os/compiler
   did you use? On our various compiles this does not show up.
   
   As for the issue, in PostgreSQL the *ereport *function causes an exit, so
   execution will never reach the return that follows. Some compilers complain
   if there isn't a final return in a function, so that is why there is one.
   Although, it will never reach it.
   
   I will correct it with a patch, though, so that it won't cause any other
   issues.
   
   John
   
   
   On Wed, Jan 27, 2021 at 1:17 AM Martin Strunz <notificati...@github.com>
   wrote:
   
   > /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
   >
   > }
   >
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-age/issues/15>, or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/AALPO4EERTXHP5TUFZQGYS3S37KZ5ANCNFSM4WU47RPA>
   > .
   >
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to