hemanthumashankar0511 commented on PR #6317: URL: https://github.com/apache/hive/pull/6317#issuecomment-3919943120
> 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. -- 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]
