[ 
https://issues.apache.org/jira/browse/MADLIB-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15156345#comment-15156345
 ] 

ASF GitHub Bot commented on MADLIB-967:
---------------------------------------

GitHub user BabakAp opened a pull request:

    https://github.com/apache/incubator-madlib/pull/20

    Fixed errors in hello_world example

    Fixes MADLIB-967 Hello World Example Errors

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BabakAp/incubator-madlib master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-madlib/pull/20.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20
    
----
commit 87fb0ce2f4c00a77f9d5632c2cecc774c3a2de3e
Author: Babak Alipour <[email protected]>
Date:   2016-02-22T01:17:03Z

    Fixed errors in hello_world example

----


> Hello World Example Errors
> --------------------------
>
>                 Key: MADLIB-967
>                 URL: https://issues.apache.org/jira/browse/MADLIB-967
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Babak Alipour
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to