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

Feng Zhu commented on CALCITE-3086:
-----------------------------------

Hi, [~hyuan], I make a thorough investigation on 
*Mapping&Mappings&MappingType*, and find that we need to make big changes even 
adding minor features.
(1) Mistakes in comments. For example, in *MappingType* class, "_A surjection 
is a mapping if every target has at least one source_", but the source column 
is marked as "<=1".
(2) *MappingType* defines the constraints on Mapping behaviors, but some 
implementations ignore it. Take getMapping method in *Project* class as 
instance: "_The mapping is an inverse surjection. Every target has a source 
field, but a source field may appear as zero, one, or more target fields._"
However, *SurjectionWithInverse* has no check on _getSource_ method. In 
addition, it seems over-designed with too many confusing mapping types but 
limited use in Calcite.
(3) Curent Mapping interface cannot cover general (_1->many&many<->many_) case.
Therefore, is it necessary to refactor this module? General mapping types 
(e.g., MULTI_FUNCTION) do not seem to be used in Calcite. I'm curious in the 
scenario you use MULTI_FUNCTION mapping.

> MULTI_FUNCTION mapping is not implemented
> -----------------------------------------
>
>                 Key: CALCITE-3086
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3086
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Haisheng Yuan
>            Assignee: Feng Zhu
>            Priority: Major
>
> When I create a Mapping with MULTI_FUNCTION type, it throws an exception. It 
> is not implemented.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to