drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tshi...@apache.org
Subject [02/26] drill git commit: read_numbers_as_double enhancement
Date Sun, 17 May 2015 06:51:22 GMT
read_numbers_as_double enhancement


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/2a06d657
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/2a06d657
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/2a06d657

Branch: refs/heads/gh-pages
Commit: 2a06d657edfaa62b733f9972a12ee93e12bb1a92
Parents: 1cec6cc
Author: Kristine Hahn <khahn@maprtech.com>
Authored: Wed May 13 17:56:40 2015 -0700
Committer: Kristine Hahn <khahn@maprtech.com>
Committed: Wed May 13 17:56:40 2015 -0700

----------------------------------------------------------------------
 .../010-configuration-options-introduction.md   | 129 ++++++++++---------
 .../050-json-data-model.md                      |  23 ++--
 _docs/sql-reference/090-sql-extensions.md       |   2 +-
 .../030-handling-different-data-types.md        |   7 +-
 4 files changed, 88 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/2a06d657/_docs/configure-drill/configuration-options/010-configuration-options-introduction.md
----------------------------------------------------------------------
diff --git a/_docs/configure-drill/configuration-options/010-configuration-options-introduction.md b/_docs/configure-drill/configuration-options/010-configuration-options-introduction.md
index 37de559..587c698 100644
--- a/_docs/configure-drill/configuration-options/010-configuration-options-introduction.md
+++ b/_docs/configure-drill/configuration-options/010-configuration-options-introduction.md
@@ -12,68 +12,75 @@ Drill sources the local `<drill_installation_directory>/conf` directory.
 The sys.options table in Drill contains information about boot (start-up) and system options. The section, ["Start-up Options"]({{site.baseurl}}/docs/start-up-options), covers how to configure and view key boot options. The sys.options table also contains many system options, some of which are described in detail the section, ["Planning and Execution Options"]({{site.baseurl}}/docs/planning-and-execution-options). The following table lists the options in alphabetical order and provides a brief description of supported options:
 
 ## System Options
-The sys.options table lists the following options that you can set at the session or system level as described in the section, ["Planning and Execution Options"]({{site.baseurl}}/docs/planning-and-execution-options) 
+The sys.options table lists the following options that you can set as a system or session option as described in the section, ["Planning and Execution Options"]({{site.baseurl}}/docs/planning-and-execution-options) 
 
-| Name                                           | Default    | Comments                                                                                                                                                                                                                                                                                                                                                         |
-|------------------------------------------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| drill.exec.functions.cast_empty_string_to_null | FALSE      | Not supported in this release.                                                                                                                                                                                                                                                                                                                                   |
-| drill.exec.storage.file.partition.column.label | dir        | Accepts a string input.                                                                                                                                                                                                                                                                                                                                          |
-| exec.errors.verbose                            | FALSE      | Toggles verbose output of executable error messages                                                                                                                                                                                                                                                                                                              |
-| exec.java_compiler                             | DEFAULT    | Switches between DEFAULT, JDK, and JANINO mode for the current session. Uses Janino by default for generated source code of less than exec.java_compiler_janino_maxsize; otherwise, switches to the JDK compiler.                                                                                                                                                |
-| exec.java_compiler_debug                       | TRUE       | Toggles the output of debug-level compiler error messages in runtime generated code.                                                                                                                                                                                                                                                                             |
-| exec.java_compiler_janino_maxsize              | 262144     | See the exec.java_compiler option comment. Accepts inputs of type LONG.                                                                                                                                                                                                                                                                                          |
-| exec.max_hash_table_size                       | 1073741824 | Ending size for hash tables. Range: 0 - 1073741824                                                                                                                                                                                                                                                                                                               |
-| exec.min_hash_table_size                       | 65536      | Starting size for hash tables. Increase according to available memory to improve performance. Range: 0 - 1073741824                                                                                                                                                                                                                                              |
-| exec.queue.enable                              | FALSE      | Changes the state of query queues to control the number of queries that run simultaneously.                                                                                                                                                                                                                                                                      |
-| exec.queue.large                               | 10         | Sets the number of large queries that can run concurrently in the cluster. Range: 0-1000                                                                                                                                                                                                                                                                         |
-| exec.queue.small                               | 100        | Sets the number of small queries that can run concurrently in the cluster. Range: 0-1001                                                                                                                                                                                                                                                                         |
-| exec.queue.threshold                           | 30000000   | Sets the cost threshold, which depends on the complexity of the queries in queue, for determining whether query is large or small. Complex queries have higher thresholds. Range: 0-9223372036854775807                                                                                                                                                          |
-| exec.queue.timeout_millis                      | 300000     | Indicates how long a query can wait in queue before the query fails. Range: 0-9223372036854775807                                                                                                                                                                                                                                                                |
-| planner.add_producer_consumer                  | FALSE      | Increase prefetching of data from disk. Disable for in-memory reads.                                                                                                                                                                                                                                                                                             |
-| planner.affinity_factor                        | 1.2        | Accepts inputs of type DOUBLE.                                                                                                                                                                                                                                                                                                                                   |
-| planner.broadcast_factor                       | 1          |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.broadcast_threshold                    | 10000000   | The maximum number of records allowed to be broadcast as part of a query. After one million records, Drill reshuffles data rather than doing a broadcast to one side of the join. Range: 0-2147483647                                                                                                                                                            |
-| planner.disable_exchanges                      | FALSE      | Toggles the state of hashing to a random exchange.                                                                                                                                                                                                                                                                                                               |
-| planner.enable_broadcast_join                  | TRUE       | Changes the state of aggregation and join operators. The broadcast join can be used for hash join, merge join and nested loop join. Use to join a large (fact) table to relatively smaller (dimension) tables. Do not disable.                                                                                                                                   |
-| planner.enable_constant_folding                | TRUE       |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.enable_demux_exchange                  | FALSE      | Toggles the state of hashing to a demulitplexed exchange.                                                                                                                                                                                                                                                                                                        |
-| planner.enable_hash_single_key                 | TRUE       |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.enable_hashagg                         | TRUE       | Enable hash aggregation; otherwise, Drill does a sort-based aggregation. Does not write to disk. Enable is recommended.                                                                                                                                                                                                                                          |
-| planner.enable_hashjoin                        | TRUE       | Enable the memory hungry hash join. Drill assumes that a query with have adequate memory to complete and tries to use the fastest operations possible to complete the planned inner, left, right, or full outer joins using a hash table. Does not write to disk. Disabling hash join allows Drill to manage arbitrarily large data in a small memory footprint. |
-| planner.enable_hashjoin_swap                   | TRUE       |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.enable_mergejoin                       | TRUE       | Sort-based operation. A merge join is used for inner join, left and right outer joins. Inputs to the merge join must be sorted. It reads the sorted input streams from both sides and finds matching rows. Writes to disk.                                                                                                                                       |
-| planner.enable_multiphase_agg                  | TRUE       | Each minor fragment does a local aggregation in phase 1, distributes on a hash basis using GROUP-BY keys partially aggregated results to other fragments, and all the fragments perform a total aggregation using this data.                                                                                                                                     |
-| planner.enable_mux_exchange                    | TRUE       | Toggles the state of hashing to a multiplexed exchange.                                                                                                                                                                                                                                                                                                          |
-| planner.enable_nestedloopjoin                  | TRUE       | Sort-based operation. Writes to disk.                                                                                                                                                                                                                                                                                                                            |
-| planner.enable_nljoin_for_scalar_only          | TRUE       |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.enable_streamagg                       | TRUE       | Sort-based operation. Writes to disk.                                                                                                                                                                                                                                                                                                                            |
-| planner.identifier_max_length                  | 1024       |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.join.hash_join_swap_margin_factor      | 10         |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.join.row_count_estimate_factor         | 1          |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.memory.average_field_width             | 8          |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.memory.enable_memory_estimation        | FALSE      | Toggles the state of memory estimation and re-planning of the query. When enabled, Drill conservatively estimates memory requirements and typically excludes these operators from the plan and negatively impacts performance.                                                                                                                                   |
-| planner.memory.hash_agg_table_factor           | 1.1        |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.memory.hash_join_table_factor          | 1.1        |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.memory.max_query_memory_per_node       | 2147483648 | Sets the maximum estimate of memory for a query per node. If the estimate is too low, Drill re-plans the query without memory-constrained operators.                                                                                                                                                                                                             |
-| planner.memory.non_blocking_operators_memory   | 64         | Range: 0-2048                                                                                                                                                                                                                                                                                                                                                    |
-| planner.nestedloopjoin_factor                  | 100        |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.partitioner_sender_max_threads         | 8          | Upper limit of threads for outbound queuing.                                                                                                                                                                                                                                                                                                                     |
-| planner.partitioner_sender_set_threads         | -1         |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.partitioner_sender_threads_factor      | 1          |                                                                                                                                                                                                                                                                                                                                                                  |
-| planner.producer_consumer_queue_size           | 10         | How much data to prefetch from disk (in record batches) out of band of query execution                                                                                                                                                                                                                                                                           |
-| planner.slice_target                           | 100000     | The number of records manipulated within a fragment before Drill parallelizes operations.                                                                                                                                                                                                                                                                        |
-| planner.width.max_per_node                     | 3          | Maximum number of threads that can run in parallel for a query on a node. A slice is an individual thread. This number indicates the maximum number of slices per query for the query’s major fragment on a node.                                                                                                                                                |
-| planner.width.max_per_query                    | 1000       | Same as max per node but applies to the query as executed by the entire cluster.                                                                                                                                                                                                                                                                                 |
-| store.format                                   | parquet    | Output format for data written to tables with the CREATE TABLE AS (CTAS) command. Allowed values are parquet, json, or text. Allowed values: 0, -1, 1000000                                                                                                                                                                                                      |
-| store.json.all_text_mode                       | FALSE      | Drill reads all data from the JSON files as VARCHAR. Prevents schema change errors.                                                                                                                                                                                                                                                                              |
-| store.mongo.all_text_mode                      | FALSE      | Similar to store.json.all_text_mode for MongoDB.                                                                                                                                                                                                                                                                                                                 |
-| store.parquet.block-size                       | 536870912  | Sets the size of a Parquet row group to the number of bytes less than or equal to the block size of MFS, HDFS, or the file system.                                                                                                                                                                                                                               |
-| store.parquet.compression                      | snappy     | Compression type for storing Parquet output. Allowed values: snappy, gzip, none                                                                                                                                                                                                                                                                                  |
-| store.parquet.enable_dictionary_encoding*      | FALSE      | Do not change.                                                                                                                                                                                                                                                                                                                                                   |
-| store.parquet.use_new_reader                   | FALSE      | Not supported                                                                                                                                                                                                                                                                                                                                                    |
-| window.enable*                                 | FALSE      | Coming soon.                                                                                                                                                                                                                                                                                                                                                     |
-
-\* Not supported in this release.
+| Name                                           | Default          | Comments                                                                                                                                                                                                                                                                                                                                                         |
+|------------------------------------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| drill.exec.functions.cast_empty_string_to_null | FALSE            | Not supported in this release.                                                                                                                                                                                                                                                                                                                                   |
+| drill.exec.storage.file.partition.column.label | dir              | The column label for directory levels in results of queries of files in a directory. Accepts a string input.                                                                                                                                                                                                                                                     |
+| exec.errors.verbose                            | FALSE            | Toggles verbose output of executable error messages                                                                                                                                                                                                                                                                                                              |
+| exec.java_compiler                             | DEFAULT          | Switches between DEFAULT, JDK, and JANINO mode for the current session. Uses Janino by default for generated source code of less than exec.java_compiler_janino_maxsize; otherwise, switches to the JDK compiler.                                                                                                                                                |
+| exec.java_compiler_debug                       | TRUE             | Toggles the output of debug-level compiler error messages in runtime generated code.                                                                                                                                                                                                                                                                             |
+| exec.java_compiler_janino_maxsize              | 262144           | See the exec.java_compiler option comment. Accepts inputs of type LONG.                                                                                                                                                                                                                                                                                          |
+| exec.max_hash_table_size                       | 1073741824       | Ending size for hash tables. Range: 0 - 1073741824. For internal use.                                                                                                                                                                                                                                                                                            |
+| exec.min_hash_table_size                       | 65536            | Starting size for hash tables. Increase according to available memory to improve performance. Range: 0 - 1073741824. For internal use.                                                                                                                                                                                                                           |
+| exec.queue.enable                              | FALSE            | Changes the state of query queues to control the number of queries that run simultaneously.                                                                                                                                                                                                                                                                      |
+| exec.queue.large                               | 10               | Sets the number of large queries that can run concurrently in the cluster. Range: 0-1000                                                                                                                                                                                                                                                                         |
+| exec.queue.small                               | 100              | Sets the number of small queries that can run concurrently in the cluster. Range: 0-1001                                                                                                                                                                                                                                                                         |
+| exec.queue.threshold                           | 30000000         | Sets the cost threshold, which depends on the complexity of the queries in queue, for determining whether query is large or small. Complex queries have higher thresholds. Range: 0-9223372036854775807                                                                                                                                                          |
+| exec.queue.timeout_millis                      | 300000           | Indicates how long a query can wait in queue before the query fails. Range: 0-9223372036854775807                                                                                                                                                                                                                                                                |
+| exec.schedule.assignment.old                   | FALSE            | Used to prevent query failure when no work units are assigned to a minor fragment, particularly when the number of files is much larger than the number of leaf fragments.                                                                                                                                                                                       |
+| exec.storage.enable_new_text_reader            | TRUE             | Enables the text reader that complies with the RFC 4180 standard for text/csv files.                                                                                                                                                                                                                                                                             |
+| new_view_default_permissions                   | 700              | Sets view permissions using an octal code in the Unix tradition.                                                                                                                                                                                                                                                                                                 |
+| planner.add_producer_consumer                  | FALSE            | Increase prefetching of data from disk. Disable for in-memory reads.                                                                                                                                                                                                                                                                                             |
+| planner.affinity_factor                        | 1.2              | Factor by which a node with endpoint affinity  is favored while creating assignment. Accepts inputs of type DOUBLE.                                                                                                                                                                                                                                              |
+| planner.broadcast_factor                       | 1                |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.broadcast_threshold                    | 10000000         | The maximum number of records allowed to be broadcast as part of a query. After one million records, Drill reshuffles data rather than doing a broadcast to one side of the join. Range: 0-2147483647                                                                                                                                                            |
+| planner.disable_exchanges                      | FALSE            | Toggles the state of hashing to a random exchange.                                                                                                                                                                                                                                                                                                               |
+| planner.enable_broadcast_join                  | TRUE             | Changes the state of aggregation and join operators. The broadcast join can be used for hash join, merge join and nested loop join. Use to join a large (fact) table to relatively smaller (dimension) tables. Do not disable.                                                                                                                                   |
+| planner.enable_constant_folding                | TRUE             | If one side of a filter condition is a constant expression, constant folding evaluates the expression in the planning phase and replaces the expression with the constant value. For example, Drill can rewrite WHERE age + 5 < 42 as WHERE age < 37.                                                                                                            |
+| planner.enable_decimal_data_type               | FALSE            | False disables the DECIMAL data type, including casting to DECIMAL and reading DECIMAL types from Parquet and Hive.                                                                                                                                                                                                                                              |
+| planner.enable_demux_exchange                  | FALSE            | Toggles the state of hashing to a demulitplexed exchange.                                                                                                                                                                                                                                                                                                        |
+| planner.enable_hash_single_key                 | TRUE             | Each hash key is associated with a single value.                                                                                                                                                                                                                                                                                                                 |
+| planner.enable_hashagg                         | TRUE             | Enable hash aggregation; otherwise, Drill does a sort-based aggregation. Does not write to disk. Enable is recommended.                                                                                                                                                                                                                                          |
+| planner.enable_hashjoin                        | TRUE             | Enable the memory hungry hash join. Drill assumes that a query with have adequate memory to complete and tries to use the fastest operations possible to complete the planned inner, left, right, or full outer joins using a hash table. Does not write to disk. Disabling hash join allows Drill to manage arbitrarily large data in a small memory footprint. |
+| planner.enable_hashjoin_swap                   | TRUE             | Enables consideration of multiple join order sequences during the planning phase. Might negatively affect the performance of some queries due to inaccuracy of estimated row count especially after a filter, join, or aggregation.                                                                                                                              |
+| planner.enable_hep_join_opt                    |                  | Enables the heuristic planner for joins.                                                                                                                                                                                                                                                                                                                         |
+| planner.enable_mergejoin                       | TRUE             | Sort-based operation. A merge join is used for inner join, left and right outer joins. Inputs to the merge join must be sorted. It reads the sorted input streams from both sides and finds matching rows. Writes to disk.                                                                                                                                       |
+| planner.enable_multiphase_agg                  | TRUE             | Each minor fragment does a local aggregation in phase 1, distributes on a hash basis using GROUP-BY keys partially aggregated results to other fragments, and all the fragments perform a total aggregation using this data.                                                                                                                                     |
+| planner.enable_mux_exchange                    | TRUE             | Toggles the state of hashing to a multiplexed exchange.                                                                                                                                                                                                                                                                                                          |
+| planner.enable_nestedloopjoin                  | TRUE             | Sort-based operation. Writes to disk.                                                                                                                                                                                                                                                                                                                            |
+| planner.enable_nljoin_for_scalar_only          | TRUE             | Supports nested loop join planning where the right input is scalar in order to enable NOT-IN, Inequality, Cartesian, and uncorrelated EXISTS planning.                                                                                                                                                                                                           |
+| planner.enable_streamagg                       | TRUE             | Sort-based operation. Writes to disk.                                                                                                                                                                                                                                                                                                                            |
+| planner.identifier_max_length                  | 1024             | A minimum length is needed because option names are identifiers themselves.                                                                                                                                                                                                                                                                                      |
+| planner.join.hash_join_swap_margin_factor      | 10               | The number of join order sequences to consider during the planning phase.                                                                                                                                                                                                                                                                                        |
+| planner.join.row_count_estimate_factor         | 1                | The factor for adjusting the estimated row count when considering multiple join order sequences during the planning phase.                                                                                                                                                                                                                                       |
+| planner.memory.average_field_width             | 8                |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.memory.enable_memory_estimation        | FALSE            | Toggles the state of memory estimation and re-planning of the query. When enabled, Drill conservatively estimates memory requirements and typically excludes these operators from the plan and negatively impacts performance.                                                                                                                                   |
+| planner.memory.hash_agg_table_factor           | 1.1              |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.memory.hash_join_table_factor          | 1.1              |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.memory.max_query_memory_per_node       | 2147483648 bytes | Sets the maximum estimate of memory for a query per node in bytes. If the estimate is too low, Drill re-plans the query without memory-constrained operators.                                                                                                                                                                                                    |
+| planner.memory.non_blocking_operators_memory   | 64               | Extra query memory per node foer non-blocking operators. This option is currently used only for memory estimation. Range: 0-2048 MB                                                                                                                                                                                                                              |
+| planner.nestedloopjoin_factor                  | 100              |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.partitioner_sender_max_threads         | 8                | Upper limit of threads for outbound queuing.                                                                                                                                                                                                                                                                                                                     |
+| planner.partitioner_sender_set_threads         | -1               |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.partitioner_sender_threads_factor      | 2                |                                                                                                                                                                                                                                                                                                                                                                  |
+| planner.producer_consumer_queue_size           | 10               | How much data to prefetch from disk (in record batches) out of band of query execution                                                                                                                                                                                                                                                                           |
+| planner.slice_target                           | 100000           | The number of records manipulated within a fragment before Drill parallelizes operations.                                                                                                                                                                                                                                                                        |
+| planner.width.max_per_node                     | 3                | Maximum number of threads that can run in parallel for a query on a node. A slice is an individual thread. This number indicates the maximum number of slices per query for the query’s major fragment on a node.                                                                                                                                                |
+| planner.width.max_per_query                    | 1000             | Same as max per node but applies to the query as executed by the entire cluster. For example, this value might be the number of active Drillbits, or a higher number to return results faster.                                                                                                                                                                   |
+| store.format                                   | parquet          | Output format for data written to tables with the CREATE TABLE AS (CTAS) command. Allowed values are parquet, json, or text. Allowed values: 0, -1, 1000000                                                                                                                                                                                                      |
+| store.json.all_text_mode                       | FALSE            | Drill reads all data from the JSON files as VARCHAR. Prevents schema change errors.                                                                                                                                                                                                                                                                              |
+| store.json.extended_types                      | FALSE            | Turns on special JSON structures that Drill serializes for storing more type information than the [four basic JSON types] (http://docs.mongodb.org/manual/reference/mongodb-extended-json/).                                                                                                                                                                     |
+| store.json.read_numbers_as_double              | FALSE            | Reads numbers with or without a decimal point as DOUBLE. Prevents schema change errors.                                                                                                                                                                                                                                                                          |
+| store.mongo.all_text_mode                      | FALSE            | Similar to store.json.all_text_mode for MongoDB.                                                                                                                                                                                                                                                                                                                 |
+| store.mongo.read_numbers_as_double             | FALSE            | Similar to store.json.read_numbers_as_double.                                                                                                                                                                                                                                                                                                                    |
+| store.parquet.block-size                       | 536870912        | Sets the size of a Parquet row group to the number of bytes less than or equal to the block size of MFS, HDFS, or the file system.                                                                                                                                                                                                                               |
+| store.parquet.compression                      | snappy           | Compression type for storing Parquet output. Allowed values: snappy, gzip, none                                                                                                                                                                                                                                                                                  |
+| store.parquet.enable_dictionary_encoding       | FALSE            | Do not change.                                                                                                                                                                                                                                                                                                                                                   |
+| store.parquet.use_new_reader                   | FALSE            | Not supported in this release.                                                                                                                                                                                                                                                                                                                                   |
+| store.text.estimated_row_size_bytes            | 100              | Estimate of the row size in a delimited text file, such as csv. The closer to actual, the better the query plan. Used for all csv files in the system/session where the value is set. Impacts the decision to plan a broadcast join or not.                                                                                                                      |
+| window.enable                                  | FALSE            | Not supported in this release. Coming soon.                                                                                                                                                                                                                                                                                                                      |
 
 
 

http://git-wip-us.apache.org/repos/asf/drill/blob/2a06d657/_docs/data-sources-and-file-formats/050-json-data-model.md
----------------------------------------------------------------------
diff --git a/_docs/data-sources-and-file-formats/050-json-data-model.md b/_docs/data-sources-and-file-formats/050-json-data-model.md
index f9ab8bf..29efeb2 100644
--- a/_docs/data-sources-and-file-formats/050-json-data-model.md
+++ b/_docs/data-sources-and-file-formats/050-json-data-model.md
@@ -28,7 +28,7 @@ JSON data consists of the following types:
 * Value: a string, number, true, false, null
 * Whitespace: used between tokens
 
-The following table shows SQL-JSON data type mapping, assuming you use the default `all_text_mode` option setting, false: 
+The following table shows SQL-JSON data type mapping: 
 
 | SQL Type | JSON Type | Description                                                                                   |
 |----------|-----------|-----------------------------------------------------------------------------------------------|
@@ -37,16 +37,23 @@ The following table shows SQL-JSON data type mapping, assuming you use the defau
 | DOUBLE   | Numeric   | Number having a decimal point in JSON, 8-byte double precision floating point number in Drill |
 | VARCHAR  | String    | Character string of variable length                                                           |
 
-Drill does not support JSON lists of different types. For example, JSON does not enforce types or distinguish between integers and floating point values. When reading numerical values from a JSON file, Drill distinguishes integers from floating point numbers by the presence or lack of a decimal point. If some numbers in a JSON map or array appear with and without a decimal point, such as 0 and 0.0, Drill throws a schema change error.
+By default, Drill does not support JSON lists of different types. For example, JSON does not enforce types or distinguish between integers and floating point values. When reading numerical values from a JSON file, Drill distinguishes integers from floating point numbers by the presence or lack of a decimal point. If some numbers in a JSON map or array appear with and without a decimal point, such as 0 and 0.0, Drill throws a schema change error. You use the following options to read JSON lists of different types:
+
+* `store.json.read_numbers_as_double`  
+  Reads numbers from JSON files with or without a decimal point as DOUBLE.
+* `store.json.all_text_mode`
+  Reads all data from JSON files as VARCHAR.
+
+The following session/system options for `store.json.all_text_mode` and `store.json.read_numbers_as_double` options is false. Enable the latter if the JSON contains integers and floating point numbers. Using either option prevents schema errors, but using `store.json.read_numbers_as_double` has an advantage over `store.json.all_text_mode`: You do not have to cast every number from VARCHAR to DOUBLE or BIGINT when you query the JSON file.
 
 ### Handling Type Differences
-Use the all text mode to prevent the schema change error that occurs from when a JSON list includes different types, as described in the previous section. Set the `store.json.all_text_mode` property to true.
+Set the `store.json.read_numbers_as_double` property to true.
 
-    ALTER SYSTEM SET `store.json.all_text_mode` = true;
+    ALTER SYSTEM SET `store.json.read_numbers_as_double` = true;
 
-When you set this option, Drill reads all data from the JSON files as VARCHAR. After reading the data, use a SELECT statement in Drill to cast data as follows:
+When you set this option, Drill reads all numbers from the JSON files as DOUBLE. After reading the data, use a SELECT statement in Drill to cast data as follows:
 
-* Cast JSON values to [SQL types]({{ site.baseurl }}/docs/data-types), such as BIGINT, DECIMAL, FLOAT, and INTEGER.
+* Cast JSON values to [SQL types]({{ site.baseurl }}/docs/data-types), such as BIGINT, FLOAT, and INTEGER.
 * Cast JSON strings to [Drill Date/Time Data Type Formats]({{ site.baseurl }}/docs/supported-date-time-data-type-formats).
 
 Drill uses [map and array data types]({{ site.baseurl }}/docs/data-types) internally for reading complex and nested data structures from JSON. You can cast data in a map or array of data to return a value from the structure, as shown in [“Create a view on a MapR-DB table”] ({{ site.baseurl }}/docs/lesson-2-run-queries-with-ansi-sql). “Query Complex Data” shows how to access nested arrays.
@@ -472,9 +479,9 @@ Drill cannot read JSON files containing changes in the schema. For example, atte
 
 Drill interprets numbers that do not have a decimal point as BigInt values. In this example, Drill recognizes the first two coordinates as doubles and the third coordinate as a BigInt, which causes an error. 
                 
-Workaround: Set the `store.json.all_text_mode` property, described earlier, to true.
+Workaround: Set the `store.json.read_numbers_as_double` property, described earlier, to true.
 
-    ALTER SYSTEM SET `store.json.all_text_mode` = true;
+    ALTER SYSTEM SET `store.json.read_numbers_as_double` = true;
 
 ### Selecting all in a JSON directory query
 Drill currently returns only fields common to all the files in a [directory query]({{ site.baseurl }}/docs/querying-directories) that selects all (SELECT *) JSON files.

http://git-wip-us.apache.org/repos/asf/drill/blob/2a06d657/_docs/sql-reference/090-sql-extensions.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/090-sql-extensions.md b/_docs/sql-reference/090-sql-extensions.md
index bb294f9..a30961c 100644
--- a/_docs/sql-reference/090-sql-extensions.md
+++ b/_docs/sql-reference/090-sql-extensions.md
@@ -13,7 +13,7 @@ Drill extends the SELECT statement for reading complex, multi-structured data. T
 Drill supports Hive and HBase as a plug-and-play data source. Drill can read tables created in Hive that use [data types compatible]({{ site.baseurl }}/docs/hive-to-drill-data-type-mapping) with Drill.  You can query Hive tables without modifications. You can query self-describing data without requiring metadata definitions in the Hive metastore. Primitives, such as JOIN, support columnar operation. 
 
 ## Extensions for JSON-related Data Sources
-For reading all JSON data as text, use the [all text mode](http://drill.apache.org/docs/handling-different-data-types/#all-text-mode-option) extension. Drill extends SQL to provide access to repeating values in arrays and arrays within arrays (array indexes). You can use these extensions to reach into deeply nested data. Drill extensions use standard JavaScript notation for referencing data elements in a hierarchy, as shown in ["Analyzing JSON."]({{ site.baseurl }}/docs/json-data-model#analyzing-json)
+For reading JSON numbers as DOUBLE or reading all JSON data as VARCHAR, use a [store.json option](http://drill.apache.org/docs/handling-different-data-types/#reading-numbers-of-different-types-from-json). Drill extends SQL to provide access to repeating values in arrays and arrays within arrays (array indexes). You can use these extensions to reach into deeply nested data. Drill extensions use standard JavaScript notation for referencing data elements in a hierarchy, as shown in ["Analyzing JSON."]({{ site.baseurl }}/docs/json-data-model#analyzing-json)
 
 ## Extensions for Parquet Data Sources
 SQL does not support all Parquet data types, so Drill infers data types in many instances. Users [cast] ({{ site.baseurl }}/docs/sql-functions) data types to ensure getting a particular data type. Drill offers more liberal casting capabilities than SQL for Parquet conversions if the Parquet data is of a logical type. You can use the default dfs storage plugin installed with Drill for reading and writing Parquet files as shown in the section, [“Parquet Format.”]({{ site.baseurl }}/docs/parquet-format)

http://git-wip-us.apache.org/repos/asf/drill/blob/2a06d657/_docs/sql-reference/data-types/030-handling-different-data-types.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/data-types/030-handling-different-data-types.md b/_docs/sql-reference/data-types/030-handling-different-data-types.md
index a8f785e..64121dd 100644
--- a/_docs/sql-reference/data-types/030-handling-different-data-types.md
+++ b/_docs/sql-reference/data-types/030-handling-different-data-types.md
@@ -56,10 +56,11 @@ The following example shows a JSON array having complex type values:
       ]
   
 
-## All text mode option
-All text mode is a system option for controlling how Drill implicitly casts JSON data. When reading numerical values from a JSON file, Drill implicitly casts a number to the DOUBLE or BIGINT type depending on the presence or absence a decimal point. If some numbers in a JSON map or array appear with and without a decimal point, such as 0 and 0.0, Drill throws a schema change error. To prevent Drill from attempting to read such data, [set all_text_mode]({{ site.baseurl }}/docs/json-data-model#handling-type-differences) to true. In all text mode, Drill implicitly casts JSON data to VARCHAR, which you can subsequently cast to desired types.
+## Reading numbers of different types from JSON
 
-Drill reads numbers without decimal point as BIGINT values by default. The range of BIGINT is -9223372036854775808 to 9223372036854775807. A BIGINT result outside this range produces an error. Use `all_text_mode` to select data as VARCHAR and then cast the data to a numerical type.
+The `store.json.read_numbers_as_double` and `store.json.all_text_mode` system/session options control how Drill implicitly casts JSON data. By default, when reading numerical values from a JSON file, Drill implicitly casts a number to the DOUBLE or BIGINT type depending on the presence or absence a decimal point. If some numbers in a JSON map or array appear with and without a decimal point, such as 0 and 0.0, Drill throws a schema change error. By default, Drill reads numbers without decimal point as BIGINT values by default. The range of BIGINT is -9223372036854775808 to 9223372036854775807. A BIGINT result outside this range produces an error. 
+
+To prevent Drill from attempting to read such data, set `store.json.read_numbers_as_double` or `store.json.all_text_mode` to true. Using `store.json.all_text_mode` set to true, Drill implicitly casts JSON data to VARCHAR. You need to cast the VARCHAR values to other types you want the returned data to represent. Using `store.json.read_numbers_as_double` set to true, Drill casts numbers in the JSON file to DOUBLE. You need to cast the DOUBLE to any other types of numbers, such as FLOAT and INTEGER, you want the returned data to represent. Using `store.json.read_numbers_as_double` typically involves less casting on your part than using `store.json.all_text_mode`.
 
 ## Guidelines for Using Float and Double
 


Mime
View raw message