[ https://issues.apache.org/jira/browse/DRILL-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14364299#comment-14364299 ]
Khurram Faraaz commented on DRILL-2478: --------------------------------------- The issue seems to be with assigning invalid/random string values to some of the SYSTEM type configuration parameters that accept string values as input. > Validating values assigned to SYSTEM/SESSION configuration parameters > --------------------------------------------------------------------- > > Key: DRILL-2478 > URL: https://issues.apache.org/jira/browse/DRILL-2478 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Data Types > Affects Versions: 0.8.0 > Environment: {code} > 0: jdbc:drill:> select * from sys.version; > +------------+----------------+-------------+-------------+------------+ > | commit_id | commit_message | commit_time | build_email | build_time | > +------------+----------------+-------------+-------------+------------+ > | f658a3c513ddf7f2d1b0ad7aa1f3f65049a594fe | DRILL-2209 Insert > ProjectOperator with MuxExchange | 09.03.2015 @ 01:49:18 EDT | Unknown | > 09.03.2015 @ 04:50:05 EDT | > +------------+----------------+-------------+-------------+------------+ > 1 row selected (0.046 seconds) > {code} > Reporter: Khurram Faraaz > Assignee: Daniel Barclay (Drill) > > Values that are assigned to configuration parameters of type SYSTEM and > SESSION must be validated. Currently any value can be assigned to some of the > SYSTEM/SESSION type parameters. > Here are two examples where assignment of invalid values to store.format does > not result in any error. > {code} > 0: jdbc:drill:> alter session set `store.format`='1'; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | store.format updated. | > +------------+------------+ > 1 row selected (0.02 seconds) > {code} > {code} > 0: jdbc:drill:> alter session set `store.format`='foo'; > +------------+------------+ > | ok | summary | > +------------+------------+ > | true | store.format updated. | > +------------+------------+ > 1 row selected (0.039 seconds) > {code} > In some cases values to some of the configuration parameters are validated, > like in this example, where trying to assign an invalid value to parameter > store.parquet.compression results in an error, which is correct. However, > this kind of validation is not performed for every configuration parameter of > SYSTEM/SESSION type. These values that are assigned to parameters must be > validated, and report errors if incorrect values are assigned by users. > {code} > 0: jdbc:drill:> alter session set `store.parquet.compression`='anything'; > Query failed: ExpressionParsingException: Option store.parquet.compression > must be one of: [snappy, gzip, none] > Error: exception while executing query: Failure while executing query. > (state=,code=0) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)