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

Vladimir Ozerov commented on IGNITE-10379:
------------------------------------------

[~alapin], my comments:
# There is no need for {{equals}} and {{hashCode}} methods for 
{{GridSqlColumn}}. Columns are equal if they have the same {{schema, tblAlias, 
colName}}
# {{IGNITE_PARTITIONS_PRUNNING_MAX_PARTIONS_BETWEEN}} value should be set to 
{{MAX_PARTITIONS_COUNT_BETWEEN}} right away. No need to re-read it on every 
query split
# {{tryExtractBetween}} method is overly complex. Ther is no need to re-check 
various invariants over and over again. Instead, we can simply go ahead with 
normal flow and return {{null}} as soon as found that no further processing is 
possible. 
# Final partition extraction is inefficient - why do we call {{extractSingle}} 
over and over again, while we already have all necessary info to get partition 
in two lines of code?

> SQL: Extract partition info from BETWEEN and range conditions for integer 
> types
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-10379
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10379
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Vladimir Ozerov
>            Assignee: Alexander Lapin
>            Priority: Major
>              Labels: iep-24
>
> If there is a range condition on affinity column of integer type, we may try 
> to extract partition info from it in a way similar to IN clause [1]:
> {{x BETWEEN 1 and 5}} -> {{x IN (1, 2, 3, 4, 5)}}
> {{x > 1 and x <= 5}} -> {{x IN (2, 3, 4, 5)}}
> [1] IGNITE-9632



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

Reply via email to