[GitHub] [calcite] danny0405 commented on pull request #2016: [CALCITE-3786] Add Digest interface to enable efficient hashCode(equa…

2020-06-18 Thread GitBox


danny0405 commented on pull request #2016:
URL: https://github.com/apache/calcite/pull/2016#issuecomment-645923910


   > Regarding my concern about memory usage, I was talking about `Digest` and 
the extra list used to store `items` which is kind of redundant with the 
`RelNode` itself. An alternative could have to replace the list of extra fields 
with an `Iterable` and call it each time items need to be collected? It could 
also possibly eliminate the creation of an array to do a comparison between 
objects...
   
   What do you mean by extra fields ? If possible, can you give a POC code 
there, the discussion with all kinds of assumptions make me burden out.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [calcite] danny0405 commented on pull request #2016: [CALCITE-3786] Add Digest interface to enable efficient hashCode(equa…

2020-06-16 Thread GitBox


danny0405 commented on pull request #2016:
URL: https://github.com/apache/calcite/pull/2016#issuecomment-644621579


   > Regarding my concern about memory usage, I was talking about `Digest` and 
the extra list used to store `items` which is kind of redundant with the 
`RelNode` itself. An alternative could have to replace the list of extra fields 
with an `Iterable` and call it each time items need to be collected? It could 
also possibly eliminate the creation of an array to do a comparison between 
objects...
   
   I have gave the explanation in the JIRA issue about why i keep redundant 
references of the RelNode items, that still makes sense to me.
   
   >An alternative could have to replace the list of extra fields with an 
`Iterable`
   
   It is possible, if you think there is also some thing can do that can 
promote the `Digest` code, go for it and very appreciate for that. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [calcite] danny0405 commented on pull request #2016: [CALCITE-3786] Add Digest interface to enable efficient hashCode(equa…

2020-06-12 Thread GitBox


danny0405 commented on pull request #2016:
URL: https://github.com/apache/calcite/pull/2016#issuecomment-643544569


   > I have to say that I don't see how this pull request makes hash code more 
efficient (precomputation of hashcode?). For sure it looks to increase memory 
usage and also remove lots of flexibility for Calcite users extending on 
RelNode and RexnNode...
   
   Compare to the old code, this patch reduce the memory usage, especially for 
the `RexNode`. What do you mean by remove lots of flexibility for Calcite users 
? Which flexibility do i remove ?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org