[JBoss JIRA] (TEIID-3227) Add support for sub-expression pushing of must pushdown functions
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3227?page=com.atlassian.jira.plugin... ]
Steven Hawkins edited comment on TEIID-3227 at 11/24/14 12:16 PM:
------------------------------------------------------------------
If the function is deterministic, then it's valid to create the pushdown form but we would need to add an aggregate such as first/last or add the function to the grouping (although that wouldn't quite be correct for rollups).
So more than likely this would look like:
SELECT AAA, SUM(first\(x)) AS BBB_ALIAS FROM (select AAA, custom_function(BBB) as x from some_table WHERE some_table.CCC = 'VAL') as v GROUP BY AAA ORDER BY AAA
Detecting this is also a little different than the existing must pushdown logic in RuleAssignOutputElements in that we're actually dealing with the grouping node and not a project node when this determination needs to be made. Although we could rationalize this by inserting an explicit project node, rather than the current logic in the grouping processing node that performs the necessary projection.
was (Author: shawkins):
If the function is deterministic, then it's valid to create the pushdown form but we would need to add an aggregate such as first/last or add the function to the grouping (although that wouldn't quite be correct for rollups).
So more than likely this would look like:
SELECT AAA, SUM(first(x)) AS BBB_ALIAS FROM (select AAA, custom_function(BBB) as x from some_table WHERE some_table.CCC = 'VAL') as v GROUP BY AAA ORDER BY AAA
Detecting this is also a little different than the existing must pushdown logic in RuleAssignOutputElements in that we're actually dealing with the grouping node and not a project node when this determination needs to be made. Although we could rationalize this by inserting an explicit project node, rather than the current logic in the grouping processing node that performs the necessary projection.
> Add support for sub-expression pushing of must pushdown functions
> -----------------------------------------------------------------
>
> Key: TEIID-3227
> URL: https://issues.jboss.org/browse/TEIID-3227
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 8.9
> Reporter: Michał Warecki
> Assignee: Steven Hawkins
> Priority: Minor
>
> As a user I'd like to have a possibility to push down sub-expressions of must pushdown functions.
> Example:
> Input query with not supported group by:
> SELECT AAA, SUM(custom_function(BBB)) AS BBB_ALIAS FROM some_table WHERE some_table.CCC = 'VAL' GROUP BY AAA ORDER BY AAA
>
> Output query (processed by teiid):
> SELECT AAA, BBB AS BBB_ALIAS FROM some_table.CCC = 'VAL'
>
> What I think it should looks like:
> SELECT AAA, custom_function(BBB) AS BBB_ALIAS FROM some_table.CCC = 'VAL'
> https://developer.jboss.org/message/910926#910926
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 4 months
[JBoss JIRA] (TEIID-3227) Add support for sub-expression pushing of must pushdown functions
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3227?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3227:
---------------------------------------
If the function is deterministic, then it's valid to create the pushdown form but we would need to add an aggregate such as first/last or add the function to the grouping (although that wouldn't quite be correct for rollups).
So more than likely this would look like:
SELECT AAA, SUM(first(x)) AS BBB_ALIAS FROM (select AAA, custom_function(BBB) as x from some_table WHERE some_table.CCC = 'VAL') as v GROUP BY AAA ORDER BY AAA
Detecting this is also a little different than the existing must pushdown logic in RuleAssignOutputElements in that we're actually dealing with the grouping node and not a project node when this determination needs to be made. Although we could rationalize this by inserting an explicit project node, rather than the current logic in the grouping processing node that performs the necessary projection.
> Add support for sub-expression pushing of must pushdown functions
> -----------------------------------------------------------------
>
> Key: TEIID-3227
> URL: https://issues.jboss.org/browse/TEIID-3227
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 8.9
> Reporter: Michał Warecki
> Assignee: Steven Hawkins
> Priority: Minor
>
> As a user I'd like to have a possibility to push down sub-expressions of must pushdown functions.
> Example:
> Input query with not supported group by:
> SELECT AAA, SUM(custom_function(BBB)) AS BBB_ALIAS FROM some_table WHERE some_table.CCC = 'VAL' GROUP BY AAA ORDER BY AAA
>
> Output query (processed by teiid):
> SELECT AAA, BBB AS BBB_ALIAS FROM some_table.CCC = 'VAL'
>
> What I think it should looks like:
> SELECT AAA, custom_function(BBB) AS BBB_ALIAS FROM some_table.CCC = 'VAL'
> https://developer.jboss.org/message/910926#910926
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 4 months
[JBoss JIRA] (TEIID-3231) Timezone of DV server has influence on Date and Timestamp columns in some data sources
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3231?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3231:
---------------------------------------
>From the BZ it says JDG, MongoDB and Solr are affected.
At least for JDG and MongoDB there is no remote notion of a Calendar based timestamp. That is to say it's all UTC so you would expect date/time/timestamp values to display differently in different local timezones vs. the remote. I assume that Solr is the same. This is not entirely undesirable behavior if you want to keep the original UTC value.
The approaches would be to have the respective translators updated with a server timezone setting (similar to JDBC) and have the translator adjust the utc value to keep the calendar fields consistent. Or don't work an enhancement and let the user manually use the modifytimezone system function.
> Timezone of DV server has influence on Date and Timestamp columns in some data sources
> --------------------------------------------------------------------------------------
>
> Key: TEIID-3231
> URL: https://issues.jboss.org/browse/TEIID-3231
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> Timezone of DV server has influence on Date and Timestamp columns in some data sources
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
11 years, 4 months