abstractdog commented on PR #6317:
URL: https://github.com/apache/hive/pull/6317#issuecomment-3919985670

   > > I have a question here:
   > > ```
   > > Set<TableDesc> processedTables = new HashSet<>();
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > Why are we storing `TableDesc` object? Can't we just do it via 
`tableDesc.getFullTableName()`, it is like just storing the `tableName` vs the 
`TableDesc`. The `equals` & `hashcode` seams comparatively heavier than a 
`String`
   > 
   > I stuck with the TableDesc object to be safe with things like self-joins 
(e.g., table A join table A). If we just checked the table name, we’d 
incorrectly skip the second configuration.
   > 
   > Also, since the planner reuses the exact same object instance for 
partitions, the Set check is mostly just comparing memory addresses. This is 
actually faster than hashing and comparing Strings.
   
   I agree with using as light comparison as possible, so I believe it's worth 
discovering String comparison
   btw: @hemanthumashankar0511 you mentioned self-joins and safety: how is it a 
risk? in case of a self-join, does "we’d incorrectly skip the second 
configuration" true? does it mean different TableDesc objects that should be 
considered twice by this configuration method


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to