asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riyafa Abdul Hameed <>
Subject Simplifying the creation of functions
Date Tue, 11 Jul 2017 17:03:26 GMT
Dear all,

I have been creating a few functions that act on geometry datatype. In each
of these functions I have been serializing or/and serializing geometry or
other datatypes. Some of these functions are STAreaDescriptor,
STIntersectsDescriptor and STMakePointDescriptor. As can be seen in these
implmentations[1] I am repeating code (Of course this is not the most
efficient way to implement because we are using  the Esri api library, but
we have given precedence for convenience over efficiency at the moment).
The number of functions to be implemented amounts to about 80[2]. This
means same code might get repeated over and over again. The implementations
of other functions also seem to do the same thing (ie. to deserialize and
then serialize)

The problem is that the arguments passed to the function via
"createEvaluatorFactory(final IScalarEvaluatorFactory[] args)" is not in
the deserialized format and the  return value should be in the serialized
format. My question is whether there's a simpler way to implement a
function where the arguments would be passed in the deserialized format and
then in function implementation we can simply return the result rather than
serializing it before returning. This would simplify the function
implementations and improve code reuse.


Thank you.
Yours sincerely,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message