Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-16 Thread Amit Langote
On 2018/07/17 8:17, Alvaro Herrera wrote: > On 2018-Jul-16, Ashutosh Bapat wrote: > >>> Hmm, let me reword this comment completely. How about the attached? > >> That looks much better. However it took me a small while to understand >> that (1), (2) and (3) correspond to strategies. > > You're

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-16 Thread Alvaro Herrera
On 2018-Jul-16, Ashutosh Bapat wrote: > > Hmm, let me reword this comment completely. How about the attached? > That looks much better. However it took me a small while to understand > that (1), (2) and (3) correspond to strategies. You're right. Amended again and pushed. I also marked the

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-16 Thread Ashutosh Bapat
On Sat, Jul 14, 2018 at 2:41 AM, Alvaro Herrera wrote: > On 2018-Jul-13, Ashutosh Bapat wrote: > >> On Fri, Jul 13, 2018 at 1:15 PM, Amit Langote >> wrote: >> >> >> >> I don't think this is true. When equality conditions and IS NULL clauses >> >> cover >> >> all partition keys of a hash

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-13 Thread Alvaro Herrera
On 2018-Jul-13, Ashutosh Bapat wrote: > On Fri, Jul 13, 2018 at 1:15 PM, Amit Langote > wrote: > >> > >> I don't think this is true. When equality conditions and IS NULL clauses > >> cover > >> all partition keys of a hash partitioned table and do not have > >> contradictory > >> clauses, we

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-13 Thread Ashutosh Bapat
On Fri, Jul 13, 2018 at 1:15 PM, Amit Langote wrote: >> >> I don't think this is true. When equality conditions and IS NULL clauses >> cover >> all partition keys of a hash partitioned table and do not have contradictory >> clauses, we should be able to find the partition which will remain

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-13 Thread Amit Langote
Thanks for the review. On 2018/07/12 22:01, Ashutosh Bapat wrote: > On Thu, Jul 12, 2018 at 11:10 AM, Amit Langote > wrote: >>> >>> I think your fix is correct. I slightly modified it along with updating >>> nearby comments and added regression tests. >> >> I updated regression tests to reduce

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-12 Thread Ashutosh Bapat
I think we should add this to open items list so that it gets tracked. On Thu, Jul 12, 2018 at 6:31 PM, Ashutosh Bapat wrote: > On Thu, Jul 12, 2018 at 11:10 AM, Amit Langote > wrote: >>> >>> I think your fix is correct. I slightly modified it along with updating >>> nearby comments and added

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-12 Thread Ashutosh Bapat
On Thu, Jul 12, 2018 at 11:10 AM, Amit Langote wrote: >> >> I think your fix is correct. I slightly modified it along with updating >> nearby comments and added regression tests. > > I updated regression tests to reduce lines. There is no point in > repeating tests like v2 patch did. + * +

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-12 Thread Dilip Kumar
On Thu, Jul 12, 2018 at 11:10 AM, Amit Langote wrote: > On 2018/07/12 14:32, Amit Langote wrote: >> Thanks Ashutosh for reporting and Dilip for the analysis and the patch. >> >> I think your fix is correct. I slightly modified it along with updating >> nearby comments and added regression

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-11 Thread Amit Langote
On 2018/07/12 14:32, Amit Langote wrote: > Thanks Ashutosh for reporting and Dilip for the analysis and the patch. > > On 2018/07/11 21:39, Dilip Kumar wrote: >> On Wed, Jul 11, 2018 at 5:36 PM, amul sul wrote: >>> On Wed, Jul 11, 2018 at 5:10 PM Dilip Kumar wrote: >> >>> I am not sure

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-11 Thread Amit Langote
Thanks Ashutosh for reporting and Dilip for the analysis and the patch. On 2018/07/11 21:39, Dilip Kumar wrote: > On Wed, Jul 11, 2018 at 5:36 PM, amul sul wrote: >> On Wed, Jul 11, 2018 at 5:10 PM Dilip Kumar wrote: > >>> >> I am not sure that I have understand the following comments >> 11 +

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-11 Thread Dilip Kumar
On Wed, Jul 11, 2018 at 5:36 PM, amul sul wrote: > On Wed, Jul 11, 2018 at 5:10 PM Dilip Kumar wrote: >> > I am not sure that I have understand the following comments > 11 +* Generate one prune step for the information derived from IS NULL, > 12 +* if any. To prune hash partitions,

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-11 Thread amul sul
On Wed, Jul 11, 2018 at 5:10 PM Dilip Kumar wrote: > > On Wed, Jul 11, 2018 at 4:20 PM, Dilip Kumar wrote: > > On Wed, Jul 11, 2018 at 3:06 PM, Ashutosh Bapat > > wrote: > >> Hi, > >> Consider following test case. > >> create table prt (a int, b int, c int) partition by range(a, b); > >> create

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-11 Thread Dilip Kumar
On Wed, Jul 11, 2018 at 4:20 PM, Dilip Kumar wrote: > On Wed, Jul 11, 2018 at 3:06 PM, Ashutosh Bapat > wrote: >> Hi, >> Consider following test case. >> create table prt (a int, b int, c int) partition by range(a, b); >> create table prt_p1 partition of prt for values (0, 0) to (100, 100); >>

Re: partition pruning doesn't work with IS NULL clause in multikey range partition case

2018-07-11 Thread Dilip Kumar
On Wed, Jul 11, 2018 at 3:06 PM, Ashutosh Bapat wrote: > Hi, > Consider following test case. > create table prt (a int, b int, c int) partition by range(a, b); > create table prt_p1 partition of prt for values (0, 0) to (100, 100); > create table prt_p1 partition of prt for values from (0, 0) to