You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/03/18 18:45:48 UTC
[jira] [Commented] (DRILL-381) Implement SQL Options Statements
[ https://issues.apache.org/jira/browse/DRILL-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13939528#comment-13939528 ]
Jacques Nadeau commented on DRILL-381:
--------------------------------------
High level comments on initial patch:
Can you move the reader to a new SystemStoragePlugin? You can then expose the options as a table in that storage plugin. (Register this plugin automatically rather than having the user configure it, similar to information schema. The table columns would probably be something like: [NAME, CATEGORY, DEFAULT, SESSION] where DEFAULT is the setting that a new session would get (a.k.a global) and the SESSION is the current value of the option. In the case that you haven't set any options, the two values would be the same.
For the options access interface, we should have the following things supported:
QueryContext.setOption()
QueryContext.getOption()
FragmentContext.getOption()
For getOption(), we should first consult the set of SESSION options. If we don't have a value there, we should use the DEFAULT option.
We should maintain the set of global options in the distributed cache across the cluster. For session options, these will be maintained on the node that owns the session. All session level options that are focused on query execution will be included in logical and physical plans.
We should probably have a category criteria for options that describes to what they correspond. For example, we could have category criteria of:
PARSING
OPTIMIZATION
EXECUTION
an example might be:
session set.
SET OPTIMIZATION PRFER_HASH_JOIN ON
global set
SET GLOBAL OPTIMIZATION PRFER_HASH_JOIN ON
syntax is made up here to describe concepts.
> Implement SQL Options Statements
> --------------------------------
>
> Key: DRILL-381
> URL: https://issues.apache.org/jira/browse/DRILL-381
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Jason Altekruse
> Assignee: Jason Altekruse
> Attachments: 0001-start-of-storage-system-for-drill-options.patch
>
>
> We need to implement a system for passing and storing options at the global and session level. Some example options include, explain plan format, allowing quoted identifiers, null handling (concat null yields null). This involves creating a notion of a user session, as previously nothing was stored per user session.
--
This message was sent by Atlassian JIRA
(v6.2#6252)