[
https://issues.apache.org/jira/browse/DRILL-4956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724497#comment-15724497
]
ASF GitHub Bot commented on DRILL-4956:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/666#discussion_r91011555
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java ---
@@ -55,13 +61,37 @@
private OptionManager sessionOptions;
private final AtomicInteger queryCount;
+ /** Unique session identifier used as suffix in temporary table names. */
+ private final String uuid;
+ /** Cache that stores all temporary tables by schema names. */
+ private final TemporaryTablesCache temporaryTablesCache;
+
+ /** On session close drops all temporary tables from their schemas and
clears temporary tables cache. */
--- End diff --
To avoid cluttering this class, should the temp tables registry be an
attribute of the user session?
```
userSession.tempTables( ).register( ... )
```
instead of
```
userSession.registerTempTable( ... )
```
then, close here would simply call close on the temp table registry.
> Temporary tables support
> ------------------------
>
> Key: DRILL-4956
> URL: https://issues.apache.org/jira/browse/DRILL-4956
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.8.0
> Reporter: Arina Ielchiieva
> Assignee: Paul Rogers
> Labels: doc-impacting
> Fix For: Future
>
>
> Link to design doc -
> https://docs.google.com/document/d/1gSRo_w6q2WR5fPx7SsQ5IaVmJXJ6xCOJfYGyqpVOC-g/edit
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)