Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with using approx functions #15

Open
siqixiong56 opened this issue Oct 18, 2018 · 0 comments
Open

Problem with using approx functions #15

siqixiong56 opened this issue Oct 18, 2018 · 0 comments

Comments

@siqixiong56
Copy link

I was trying to run the approx functions locally. However, they behaved differently from what's one the tutorial. The approx sum needs 3 arguments and I am not sure what to put in order to approximate. Can someone help me use them? Also, I cannot use error, samplewith...
shark> describe rand5000;
OK
numbers int
Time taken: 0.143 seconds
shark> select approx_sum(numbers) from rand5000;
62.169: [GC (Metadata GC Threshold) 179982K->30429K(1005056K), 0.0271976 secs]
62.196: [Full GC (Metadata GC Threshold) 30429K->19981K(1005056K), 0.0866642 secs]
63.093: [GC (System.gc()) 45909K->21763K(1005056K), 0.0042580 secs]
63.097: [Full GC (System.gc()) 21763K->10910K(1005056K), 0.1983384 secs]
63.299: [GC (System.gc()) 15782K->11078K(1005056K), 0.0017398 secs]
63.301: [Full GC (System.gc()) 11078K->9947K(1005056K), 0.0761869 secs]
FAILED: Error in semantic analysis: Exactly one argument is expected.
shark> select approx_sum(numbers, numbers, numbers) from rand5000;
130.911: [GC (Allocation Failure) 264388K->30538K(1005056K), 0.0253560 secs]
132.398: [GC (Allocation Failure) 292682K->51941K(1005056K), 0.0284526 secs]
132.821: [GC (Allocation Failure) 309431K->30135K(1005056K), 0.0112377 secs]
OK
2471570.0 +/- NaN (99% Confidence)
Time taken: 4.154 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant