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

ASF GitHub Bot commented on DRILL-6463:
---------------------------------------

sohami commented on a change in pull request #1303: DRILL-6463 : Fix integer 
overflow in MockGroupScanPOP
URL: https://github.com/apache/drill/pull/1303#discussion_r193807796
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/ScanStats.java
 ##########
 @@ -23,27 +23,27 @@
 
   public static final ScanStats ZERO_RECORD_TABLE = new 
ScanStats(GroupScanProperty.EXACT_ROW_COUNT, 0, 1, 1);
 
-  private final long recordCount;
-  private final float cpuCost;
-  private final float diskCost;
+  private final double recordCount;
+  private final double cpuCost;
+  private final double diskCost;
   private final GroupScanProperty property;
 
-  public ScanStats(GroupScanProperty property, long recordCount, float 
cpuCost, float diskCost) {
+  public ScanStats(GroupScanProperty property, double recordCount, double 
cpuCost, double diskCost) {
 
 Review comment:
   There are other GroupScanPop where the rowCount stats for example is 
converted from double to long while creating ScanStats. Whereas in most of the 
cases rowCount is long only. 
   Since we are making this change for treating rowCount or other stats as 
double, shouldn't we update other GroupScanPop's as well to make sure they are 
creating stats using correct type ?
   
   [Example of rowCount with double type but converted to 
long.](https://github.com/apache/drill/blob/master/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcGroupScan.java#L82)
   [Example of rowCount with long 
type.](https://github.com/apache/drill/blob/master/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableGroupScan.java#L188)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> ProfileParser cannot parse costs when using MockScanBatch
> ---------------------------------------------------------
>
>                 Key: DRILL-6463
>                 URL: https://issues.apache.org/jira/browse/DRILL-6463
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.13.0
>            Reporter: Gautam Kumar Parai
>            Assignee: Gautam Kumar Parai
>            Priority: Major
>              Labels: ready-to-commit
>             Fix For: 1.14.0
>
>
> One of the unit testHashAggrSecondaryTertiarySpill() runs into this issue 
> although the issue is generic. It happens due to cost being stored in an int 
> which overflows with big enough rows/data size and becomes negative. This 
> causes the Profile parser to error out on seeing negative costs.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to