You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by paul-rogers <gi...@git.apache.org> on 2017/10/12 23:45:33 UTC

[GitHub] drill pull request #990: DRILL-5872: Workaround for invalid cost in physical...

GitHub user paul-rogers opened a pull request:

    https://github.com/apache/drill/pull/990

    DRILL-5872: Workaround for invalid cost in physical plans

    See DRILL-5872 for details.
    
    Works around a bug in a storage plugin that produces NaN for a cost estimate, which then leads to profiles that can't be deserialized. This fix simply replaces the NaN in the profile with the maximum double value.
    
    The real fix is that the storage plugin concerned should not produce NaN estimates.

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

    $ git pull https://github.com/paul-rogers/drill DRILL-5872

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

    https://github.com/apache/drill/pull/990.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 #990
    
----
commit 416bc527c4528d93ea23169292bd42578a4c647a
Author: Paul Rogers <pr...@maprtech.com>
Date:   2017-10-12T22:27:31Z

    DRILL-5872: Workaround for invalid cost in physical plans
    
    See DRILL-5872 for details.

----


---

[GitHub] drill pull request #990: DRILL-5872: Workaround for invalid cost in physical...

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers closed the pull request at:

    https://github.com/apache/drill/pull/990


---

[GitHub] drill pull request #990: DRILL-5872: Workaround for invalid cost in physical...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/990#discussion_r144603055
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/PhysicalPlan.java ---
    @@ -94,6 +94,14 @@ public double totalCost() {
         for (final PhysicalOperator ops : getSortedOperators()) {
           totalCost += ops.getCost();
         }
    +
    +    // As it turns out, sometimes the total cost can be out of range.
    +    // This throws off other code, so clamp the cost at the maximum
    +    // double value.
    +
    +    if (Double.isNaN(totalCost)) {
    +      totalCost = Double.MAX_VALUE;
    --- End diff --
    
    May be better to replace with 0 or negative number, like -1 (like the second option better). Won't be max double value confusing in this case? It's just nan is not a number and replace it with double max value.


---

[GitHub] drill issue #990: DRILL-5872: Workaround for invalid cost in physical plans

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/990
  
    Fixed in planner, so closing this.


---

[GitHub] drill issue #990: DRILL-5872: Workaround for invalid cost in physical plans

Posted by priteshm <gi...@git.apache.org>.
Github user priteshm commented on the issue:

    https://github.com/apache/drill/pull/990
  
    @amansinha100  or @arina-ielchiieva  can you please review this?


---

[GitHub] drill issue #990: DRILL-5872: Workaround for invalid cost in physical plans

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/990
  
    Is there a Jira for storage plugin fix?


---