Skip to content

Conversation

@egraldlo
Copy link
Contributor

@egraldlo egraldlo commented Jun 5, 2014

since we define the return data type of avg() to DoubleType, I think we can do our best to extend the scope to avoid the overflowing, so I think we can transform the datatype to DoubleType before sum.

@egraldlo egraldlo changed the title do best to avoid overflowing in function avg [sql] do best to avoid overflowing in function avg Jun 5, 2014
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@egraldlo egraldlo changed the title [sql] do best to avoid overflowing in function avg [SPARK-2049] [sql] Avg function may cause overflow Jun 6, 2014
@marmbrus
Copy link
Contributor

I think the test case you added already passes because of the rules here. Am I missing something?

@egraldlo
Copy link
Contributor Author

yes, maybe I don't make the version of test branch to be up-to-date at that time. I will close the issue.

@egraldlo egraldlo closed this Jun 10, 2014
@marmbrus
Copy link
Contributor

No worries. I'm going to commit the test case anyway here: #1033

asfgit pushed a commit that referenced this pull request Jun 10, 2014
By @egraldlo.

Author: egraldlo <[email protected]>
Author: Michael Armbrust <[email protected]>

Closes #1033 from marmbrus/pr/978 and squashes the following commits:

e228c5e [Michael Armbrust] Remove "test".
762aeaf [Michael Armbrust] Remove unneeded rule. More descriptive name for test table.
d414cd7 [egraldlo] fommatting issues
1153f75 [egraldlo] do best to avoid overflowing in function avg().

(cherry picked from commit 1abbde0)
Signed-off-by: Michael Armbrust <[email protected]>
asfgit pushed a commit that referenced this pull request Jun 10, 2014
By @egraldlo.

Author: egraldlo <[email protected]>
Author: Michael Armbrust <[email protected]>

Closes #1033 from marmbrus/pr/978 and squashes the following commits:

e228c5e [Michael Armbrust] Remove "test".
762aeaf [Michael Armbrust] Remove unneeded rule. More descriptive name for test table.
d414cd7 [egraldlo] fommatting issues
1153f75 [egraldlo] do best to avoid overflowing in function avg().
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
By @egraldlo.

Author: egraldlo <[email protected]>
Author: Michael Armbrust <[email protected]>

Closes apache#1033 from marmbrus/pr/978 and squashes the following commits:

e228c5e [Michael Armbrust] Remove "test".
762aeaf [Michael Armbrust] Remove unneeded rule. More descriptive name for test table.
d414cd7 [egraldlo] fommatting issues
1153f75 [egraldlo] do best to avoid overflowing in function avg().
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
By @egraldlo.

Author: egraldlo <[email protected]>
Author: Michael Armbrust <[email protected]>

Closes apache#1033 from marmbrus/pr/978 and squashes the following commits:

e228c5e [Michael Armbrust] Remove "test".
762aeaf [Michael Armbrust] Remove unneeded rule. More descriptive name for test table.
d414cd7 [egraldlo] fommatting issues
1153f75 [egraldlo] do best to avoid overflowing in function avg().
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

Successfully merging this pull request may close these issues.

3 participants