Greetings everyone,

I am Babak Alipour, a student at University of Florida. I have been trying
to use MADlib and I hope to contribute to the community later on.

While trying to go through the quick start guide for developers (available
here :
https://cwiki.apache.org/confluence/display/MADLIB/Quick+Start+Guide+for+Developers),
I realized that in avg_var.cpp there are some lines that use 'this.member'.
I think 'this' is a pointer and it should be used with '->'.
So I tried to build MADlib from source with these files added, and it
doesn't.
It produces multiple compile-time errors:
E.g. ' error: request for member ‘avg’ in ‘this’, which is of pointer type
...'

Replacing every 'this.'  with 'this->' takes care of those errors but there
are still a few more errors in the given example.

Line 53:
double a = static_cast<double>(state.numRows) / normalizer;
Produces an error, since 'state' is not defined in this scope. Since this
function is overloading '+=', I think it's safe to say this was supposed to
be the state of 'this', so I replaced it with 'this->' and that error went
away.

Lines 44 & 45:
template <class OtherHandle>
AvgVarTransitionState &operator+=(const double x){

This was also producing compile errors. (failed to deduce OtherHandle
template type) This takes a double and adds it to the state, so I don't see
any uses for 'OtherHandle' in this context and I commented line 44.

All said and done, MADlib now compiles, installs and works just fine.

I was wondering if anyone else encountered these issues while going through
the hello world example.

I could fork the project, fix the example and submit a pull-request if you
think that's the way to go.


Best regards,
*Babak Alipour ,*
*University of Florida*

Reply via email to