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

Julian Hyde edited comment on CALCITE-505 at 5/11/15 11:44 PM:
---------------------------------------------------------------

Like this:{code}final Map<Integer, RexNode> projectMap = new HashMap<>();
final List<RexNode> filters = new ArrayList<>();
final RexNode constraint =
    modifiableView.getConstraint(rexBuilder, delegateRowType);
RelOptUtil.inferViewPredicates(projectMap, filters, constraint);{code}

After executing this code, {{projectMap.get( i )}} will contain a RexLiteral if 
column #i is constrained to a constant, null otherwise. You can see a use of 
this code in {{SqlToRelConverter#createSource}}.



was (Author: julianhyde):
Like this:{code}final Map<Integer, RexNode> projectMap = new HashMap<>();
final List<RexNode> filters = new ArrayList<>();
final RexNode constraint =
    modifiableView.getConstraint(rexBuilder, delegateRowType);
RelOptUtil.inferViewPredicates(projectMap, filters, constraint);{code}

After executing this code, {{projectMap.get(i)}} will contain a RexLiteral if 
column #i is constrained to a constant, null otherwise. You can see a use of 
this code in {{SqlToRelConverter#createSource}}.


> Support updatable VIEW
> ----------------------
>
>                 Key: CALCITE-505
>                 URL: https://issues.apache.org/jira/browse/CALCITE-505
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Julian Hyde
>              Labels: phoenix
>
> Phoenix allows updates to occur through a VIEW in certain, simple cases (i.e. 
> when the WHERE clause of a VIEW contains only simple equality statements). 
> It'd be useful if Calcite allowed for this as well. See 
> http://phoenix.apache.org/views.html#Updatable_Views for more information.



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

Reply via email to