[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-09-18 Thread Aman Sinha (JIRA)

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

Aman Sinha updated DRILL-2748:
--
Assignee: Jinfeng Ni  (was: Aman Sinha)

> Filter is not pushed down into subquery with the group by
> -
>
> Key: DRILL-2748
> URL: https://issues.apache.org/jira/browse/DRILL-2748
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Query Planning & Optimization
>Affects Versions: 0.9.0, 1.0.0, 1.1.0
>Reporter: Victoria Markman
>Assignee: Jinfeng Ni
> Fix For: 1.2.0
>
> Attachments: 
> 0001-DRILL-2748-Improve-cost-estimation-for-Drill-logical.patch
>
>
> I'm not sure about this one, theoretically filter could have been pushed into 
> the subquery.
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from (select a1, 
> b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
> $2)), $3)):ANY NOT NULL])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
> agg#1=[COUNT($0)])
> 00-06Project(a1=[$1], b1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
> `b1`]]])
> {code}
> Same with distinct in subquery:
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from ( select 
> distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[$2])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1, 2}])
> 00-06Project(a1=[$2], b1=[$1], c1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
> `c1`]]])
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-09-17 Thread Jinfeng Ni (JIRA)

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

Jinfeng Ni updated DRILL-2748:
--
Assignee: Aman Sinha  (was: Jinfeng Ni)

> Filter is not pushed down into subquery with the group by
> -
>
> Key: DRILL-2748
> URL: https://issues.apache.org/jira/browse/DRILL-2748
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Query Planning & Optimization
>Affects Versions: 0.9.0, 1.0.0, 1.1.0
>Reporter: Victoria Markman
>Assignee: Aman Sinha
> Fix For: 1.2.0
>
> Attachments: 
> 0001-DRILL-2748-Improve-cost-estimation-for-Drill-logical.patch
>
>
> I'm not sure about this one, theoretically filter could have been pushed into 
> the subquery.
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from (select a1, 
> b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
> $2)), $3)):ANY NOT NULL])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
> agg#1=[COUNT($0)])
> 00-06Project(a1=[$1], b1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
> `b1`]]])
> {code}
> Same with distinct in subquery:
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from ( select 
> distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[$2])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1, 2}])
> 00-06Project(a1=[$2], b1=[$1], c1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
> `c1`]]])
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-09-17 Thread Jinfeng Ni (JIRA)

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

Jinfeng Ni updated DRILL-2748:
--
Attachment: (was: 
0001-DRILL-2748-Add-optimizer-rule-to-push-filter-past-ag.patch)

> Filter is not pushed down into subquery with the group by
> -
>
> Key: DRILL-2748
> URL: https://issues.apache.org/jira/browse/DRILL-2748
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Query Planning & Optimization
>Affects Versions: 0.9.0, 1.0.0, 1.1.0
>Reporter: Victoria Markman
>Assignee: Jinfeng Ni
> Fix For: 1.2.0
>
> Attachments: 
> 0001-DRILL-2748-Improve-cost-estimation-for-Drill-logical.patch
>
>
> I'm not sure about this one, theoretically filter could have been pushed into 
> the subquery.
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from (select a1, 
> b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
> $2)), $3)):ANY NOT NULL])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
> agg#1=[COUNT($0)])
> 00-06Project(a1=[$1], b1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
> `b1`]]])
> {code}
> Same with distinct in subquery:
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from ( select 
> distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[$2])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1, 2}])
> 00-06Project(a1=[$2], b1=[$1], c1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
> `c1`]]])
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-09-17 Thread Jinfeng Ni (JIRA)

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

Jinfeng Ni updated DRILL-2748:
--
Attachment: 0001-DRILL-2748-Improve-cost-estimation-for-Drill-logical.patch

> Filter is not pushed down into subquery with the group by
> -
>
> Key: DRILL-2748
> URL: https://issues.apache.org/jira/browse/DRILL-2748
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Query Planning & Optimization
>Affects Versions: 0.9.0, 1.0.0, 1.1.0
>Reporter: Victoria Markman
>Assignee: Jinfeng Ni
> Fix For: 1.2.0
>
> Attachments: 
> 0001-DRILL-2748-Add-optimizer-rule-to-push-filter-past-ag.patch, 
> 0001-DRILL-2748-Improve-cost-estimation-for-Drill-logical.patch
>
>
> I'm not sure about this one, theoretically filter could have been pushed into 
> the subquery.
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from (select a1, 
> b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
> $2)), $3)):ANY NOT NULL])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
> agg#1=[COUNT($0)])
> 00-06Project(a1=[$1], b1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
> `b1`]]])
> {code}
> Same with distinct in subquery:
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select x, y, z from ( select 
> distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
> +++
> |text|json|
> +++
> | 00-00Screen
> 00-01  Project(x=[$0], y=[$1], z=[$2])
> 00-02Project(x=[$0], y=[$1], z=[$2])
> 00-03  SelectionVectorRemover
> 00-04Filter(condition=[=($0, 10)])
> 00-05  HashAgg(group=[{0, 1, 2}])
> 00-06Project(a1=[$2], b1=[$1], c1=[$0])
> 00-07  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
> selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
> `c1`]]])
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-08-27 Thread Jinfeng Ni (JIRA)

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

Jinfeng Ni updated DRILL-2748:
--
Affects Version/s: 1.0.0
   1.1.0

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0, 1.0.0, 1.1.0
Reporter: Victoria Markman
Assignee: Jinfeng Ni
 Fix For: 1.2.0


 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-08-27 Thread Jinfeng Ni (JIRA)

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

Jinfeng Ni updated DRILL-2748:
--
Assignee: Aman Sinha  (was: Jinfeng Ni)

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0, 1.0.0, 1.1.0
Reporter: Victoria Markman
Assignee: Aman Sinha
 Fix For: 1.2.0

 Attachments: 
 0001-DRILL-2748-Add-optimizer-rule-to-push-filter-past-ag.patch


 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-08-27 Thread Aman Sinha (JIRA)

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

Aman Sinha updated DRILL-2748:
--
Assignee: Jinfeng Ni  (was: Aman Sinha)

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0, 1.0.0, 1.1.0
Reporter: Victoria Markman
Assignee: Jinfeng Ni
 Fix For: 1.2.0

 Attachments: 
 0001-DRILL-2748-Add-optimizer-rule-to-push-filter-past-ag.patch


 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-08-27 Thread Jinfeng Ni (JIRA)

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

Jinfeng Ni updated DRILL-2748:
--
Attachment: 0001-DRILL-2748-Add-optimizer-rule-to-push-filter-past-ag.patch

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0, 1.0.0, 1.1.0
Reporter: Victoria Markman
Assignee: Jinfeng Ni
 Fix For: 1.2.0

 Attachments: 
 0001-DRILL-2748-Add-optimizer-rule-to-push-filter-past-ag.patch


 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-07-02 Thread Parth Chandra (JIRA)

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

Parth Chandra updated DRILL-2748:
-
Assignee: Jinfeng Ni

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0
Reporter: Victoria Markman
Assignee: Jinfeng Ni
 Fix For: 1.2.0


 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-05-05 Thread Jacques Nadeau (JIRA)

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

Jacques Nadeau updated DRILL-2748:
--
Fix Version/s: 1.2.0

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0
Reporter: Victoria Markman
 Fix For: 1.2.0


 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-04-10 Thread Jacques Nadeau (JIRA)

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

Jacques Nadeau updated DRILL-2748:
--
Component/s: Query Planning  Optimization

 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0
Reporter: Victoria Markman

 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2748) Filter is not pushed down into subquery with the group by

2015-04-10 Thread Victoria Markman (JIRA)

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

Victoria Markman updated DRILL-2748:

Description: 
I'm not sure about this one, theoretically filter could have been pushed into 
the subquery.

{code}
0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, b1, 
avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
+++
|text|json|
+++
| 00-00Screen
00-01  Project(x=[$0], y=[$1], z=[$2])
00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
$2)), $3)):ANY NOT NULL])
00-03  SelectionVectorRemover
00-04Filter(condition=[=($0, 10)])
00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], agg#1=[COUNT($0)])
00-06Project(a1=[$1], b1=[$0])
00-07  Scan(groupscan=[ParquetGroupScan 
[entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`]]])
{code}

Same with distinct in subquery:
{code}
0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
+++
|text|json|
+++
| 00-00Screen
00-01  Project(x=[$0], y=[$1], z=[$2])
00-02Project(x=[$0], y=[$1], z=[$2])
00-03  SelectionVectorRemover
00-04Filter(condition=[=($0, 10)])
00-05  HashAgg(group=[{0, 1, 2}])
00-06Project(a1=[$2], b1=[$1], c1=[$0])
00-07  Scan(groupscan=[ParquetGroupScan 
[entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
`c1`]]])
{code}

  was:
I'm not sure about this one, theoretically filter could have been pushed into 
the subquery.

{code}
0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, b1, 
avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
+++
|text|json|
+++
| 00-00Screen
00-01  Project(x=[$0], y=[$1], z=[$2])
00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
$2)), $3)):ANY NOT NULL])
00-03  SelectionVectorRemover
00-04Filter(condition=[=($0, 10)])
00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], agg#1=[COUNT($0)])
00-06Project(a1=[$1], b1=[$0])
00-07  Scan(groupscan=[ParquetGroupScan 
[entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`]]])
{code}


 Filter is not pushed down into subquery with the group by
 -

 Key: DRILL-2748
 URL: https://issues.apache.org/jira/browse/DRILL-2748
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning  Optimization
Affects Versions: 0.9.0
Reporter: Victoria Markman

 I'm not sure about this one, theoretically filter could have been pushed into 
 the subquery.
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from (select a1, 
 b1, avg(a1) from t1 group by a1, b1) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[CAST(/(CastHigh(CASE(=($3, 0), null, 
 $2)), $3)):ANY NOT NULL])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1}], agg#0=[$SUM0($0)], 
 agg#1=[COUNT($0)])
 00-06Project(a1=[$1], b1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, 
 `b1`]]])
 {code}
 Same with distinct in subquery:
 {code}
 0: jdbc:drill:schema=dfs explain plan for select x, y, z from ( select 
 distinct a1, b1, c1 from t1 ) as sq(x, y, z) where x = 10;
 +++
 |text|json|
 +++
 | 00-00Screen
 00-01  Project(x=[$0], y=[$1], z=[$2])
 00-02Project(x=[$0], y=[$1], z=[$2])
 00-03  SelectionVectorRemover
 00-04Filter(condition=[=($0, 10)])
 00-05  HashAgg(group=[{0, 1, 2}])
 00-06Project(a1=[$2], b1=[$1], c1=[$0])
 00-07  Scan(groupscan=[ParquetGroupScan 
 [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], 
 selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, 
 `c1`]]])