[jira] [Commented] (DRILL-8376) Add Distribution UDFs

2023-01-10 Thread ASF GitHub Bot (Jira)


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

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

cgivre merged PR #2729:
URL: https://github.com/apache/drill/pull/2729




> Add Distribution UDFs
> -
>
> Key: DRILL-8376
> URL: https://issues.apache.org/jira/browse/DRILL-8376
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Functions - Drill
>Affects Versions: 1.21.0
>Reporter: Charles Givre
>Assignee: Charles Givre
>Priority: Minor
>
> Add `width_bucket`, `pearson_correlation` and `kendall_correlation` to Drill



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DRILL-8376) Add Distribution UDFs

2023-01-10 Thread ASF GitHub Bot (Jira)


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

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

cgivre commented on code in PR #2729:
URL: https://github.com/apache/drill/pull/2729#discussion_r1065940539


##
contrib/udfs/src/main/java/org/apache/drill/exec/udfs/DistributionFunctions.java:
##
@@ -51,31 +51,29 @@ public static class WidthBucketFunction implements 
DrillSimpleFunc {
 @Workspace
 double binWidth;
 
+@Workspace
+int bucketCount;
+
 @Output
 IntHolder bucket;
 
 @Override
 public void setup() {
   double max = MaxRangeValueHolder.value;
   double min = MinRangeValueHolder.value;
-  int bucketCount = bucketCountHolder.value;
+  bucketCount = bucketCountHolder.value;
   binWidth = (max - min) / bucketCount;
 }
 
 @Override
 public void eval() {
-  // There is probably a more elegant way of doing this...
-  double binFloor = MinRangeValueHolder.value;
-  double binCeiling = binFloor + binWidth;
-
-  for (int i = 1; i <= bucketCountHolder.value; i++) {
-if (inputValue.value <= binCeiling && inputValue.value > binFloor) {
-   bucket.value = i;
-   break;
-} else {
-  binFloor = binCeiling;
-  binCeiling = binWidth * (i + 1);
-}
+  if (inputValue.value < MinRangeValueHolder.value) {
+bucket.value = 0;
+  } else if (inputValue.value > MaxRangeValueHolder.value) {
+bucket.value = bucketCount + 1;
+  } else {
+double f = (1 + (inputValue.value - MinRangeValueHolder.value) / 
binWidth);

Review Comment:
   Oops... That was a test variable.  Removed. 





> Add Distribution UDFs
> -
>
> Key: DRILL-8376
> URL: https://issues.apache.org/jira/browse/DRILL-8376
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Functions - Drill
>Affects Versions: 1.21.0
>Reporter: Charles Givre
>Assignee: Charles Givre
>Priority: Minor
>
> Add `width_bucket`, `pearson_correlation` and `kendall_correlation` to Drill



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DRILL-8384) Add Format Plugin for Microsoft Access

2023-01-10 Thread ASF GitHub Bot (Jira)


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

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

cgivre opened a new pull request, #2737:
URL: https://github.com/apache/drill/pull/2737

   # [DRILL-8384](https://issues.apache.org/jira/browse/DRILL-8384): Add Format 
Plugin for Microsoft Access
   
   ## Description
   Added format plugin to enable Drill to read MS Access files. 
   
   ## Documentation
   See README.
   
   ## Testing
   Added unit tests.




> Add Format Plugin for Microsoft Access
> --
>
> Key: DRILL-8384
> URL: https://issues.apache.org/jira/browse/DRILL-8384
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Format - MS Access
>Affects Versions: 1.21.0
>Reporter: Charles Givre
>Assignee: Charles Givre
>Priority: Major
> Fix For: 1.21.0
>
>
> Shockingly, MS Access is still in widespread use.  This plugin enables Drill 
> to read MS Access files. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (DRILL-8384) Add Format Plugin for Microsoft Access

2023-01-10 Thread Charles Givre (Jira)
Charles Givre created DRILL-8384:


 Summary: Add Format Plugin for Microsoft Access
 Key: DRILL-8384
 URL: https://issues.apache.org/jira/browse/DRILL-8384
 Project: Apache Drill
  Issue Type: Improvement
  Components: Format - MS Access
Affects Versions: 1.21.0
Reporter: Charles Givre
Assignee: Charles Givre
 Fix For: 1.21.0


Shockingly, MS Access is still in widespread use.  This plugin enables Drill to 
read MS Access files. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (DRILL-8383) Convert Image format plugin to EVF2

2023-01-10 Thread James Turton (Jira)
James Turton created DRILL-8383:
---

 Summary: Convert Image format plugin to EVF2
 Key: DRILL-8383
 URL: https://issues.apache.org/jira/browse/DRILL-8383
 Project: Apache Drill
  Issue Type: Improvement
  Components: Storage - Other
Affects Versions: 1.20.3
Reporter: James Turton
Assignee: James Turton
 Fix For: 1.21.0






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (DRILL-8382) Convert Image format plugin to EVF2

2023-01-10 Thread James Turton (Jira)
James Turton created DRILL-8382:
---

 Summary: Convert Image format plugin to EVF2
 Key: DRILL-8382
 URL: https://issues.apache.org/jira/browse/DRILL-8382
 Project: Apache Drill
  Issue Type: Sub-task
  Components: Storage - Other
Affects Versions: 1.20.3
Reporter: James Turton
Assignee: James Turton
 Fix For: 1.21.0






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Deleted] (DRILL-8382) Convert Image format plugin to EVF2

2023-01-10 Thread James Turton (Jira)


 [ 
https://issues.apache.org/jira/browse/DRILL-8382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Turton deleted DRILL-8382:



> Convert Image format plugin to EVF2
> ---
>
> Key: DRILL-8382
> URL: https://issues.apache.org/jira/browse/DRILL-8382
> Project: Apache Drill
>  Issue Type: Sub-task
>Reporter: James Turton
>Assignee: James Turton
>Priority: Minor
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)