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

Julian Hyde commented on CALCITE-1666:
--------------------------------------

In your change "Improve time complexity for INSERT to modifiable view" the code 
could be made less verbose and possibly more efficient. For example 
{{indexToField.get(source.getIndex())}} could be changed to 
{{indexToField.containsKey(source.getIndex())}}, and when you notice that 
you're just interested in the keys in the map, you could replace the entire 
method with {{new ImmutableBitSet(source.getKeys())}}. Maybe you need to 
intersect it with {{ImmutableBitSet.range(sourceRowType.getFieldCount())}}; I'm 
not sure.

Also I think {{getIndexToFieldMap}} would be more straightforward to use if it 
returned an immutable map, rather than populating a mutable map argument. 
Functional programming.

> Support for modifiable views with extended columns
> --------------------------------------------------
>
>                 Key: CALCITE-1666
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1666
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.11.0
>            Reporter: Kevin Liew
>            Assignee: Julian Hyde
>              Labels: validator, view
>             Fix For: 1.12.0
>
>
> The changes for this PR is to:
> - propagate extended columns (already parsed into namespaces in the 
> validator) through to the planner
> - validate {{INSERT}} and {{UPDATE}} operations against the constraints of 
> the modifiable view
> [~maryannxue], [~rajeshbabu], [~jamestaylor]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to