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

Andrey Mashenkov updated IGNITE-20246:
--------------------------------------
    Description: 
*Motivation*

As for now, we have IgniteDistribution trait with DistributionFunction inside. 
`IgniteDistribution.destination()` method accepts hash-function factory 
regardless if the function hash-based or not.
The hash-function  factory requires SchemaManager to create affinity function, 
but actually it needs a descriptor, which already available via 
ResolvedDependencies at a place where the factory instantiates the affinity 
function.

*Suggestion*
# Implement a DestinationFactory class to convert a logical 
DistributionFunction into a physical node Destination, using hash function 
factory and a table descriptor from ResolvedDependencies. LogicalRelImplementor 
could use this DestinationFactory.
# Remove `IgniteDistribution.destination()` method.
# Remove SchemaManager from HashFunctionFactory implementation

  was:
*Motivation*

As for now, we have IgniteDistribution trait with DistributionFunction inside. 
`IgniteDistribution.destination()` method accepts hash-function factory 
regardless if the function hash-based or not.
The hash-function  factory requires SchemaManager to create affinity function, 
but actually it needs a descriptor, which already available via 
ResolvedDependencies at a place where the factory instantiates the affinity 
function.

*Suggestion*
# LogicalRelImplementor could convert this logical DistributionFunction into a 
physical node Destination, using hash function factory and a table descriptor 
from ResolvedDependencies.
# Remove `IgniteDistribution.destination()` method.
# Remove SchemaManager from HashFunctionFactory implementation


> Sql. Decouple logical distribution trait and physical function
> --------------------------------------------------------------
>
>                 Key: IGNITE-20246
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20246
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Andrey Mashenkov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3, tech-debt
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Motivation*
> As for now, we have IgniteDistribution trait with DistributionFunction 
> inside. `IgniteDistribution.destination()` method accepts hash-function 
> factory regardless if the function hash-based or not.
> The hash-function  factory requires SchemaManager to create affinity 
> function, but actually it needs a descriptor, which already available via 
> ResolvedDependencies at a place where the factory instantiates the affinity 
> function.
> *Suggestion*
> # Implement a DestinationFactory class to convert a logical 
> DistributionFunction into a physical node Destination, using hash function 
> factory and a table descriptor from ResolvedDependencies. 
> LogicalRelImplementor could use this DestinationFactory.
> # Remove `IgniteDistribution.destination()` method.
> # Remove SchemaManager from HashFunctionFactory implementation



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to