You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by br...@apache.org on 2015/09/09 01:44:12 UTC

[4/4] drill git commit: fix comment

fix comment

DRILL-3704


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

Branch: refs/heads/gh-pages
Commit: be2f2223449316bbf478e6b99cab8b1f74802d07
Parents: da949f1
Author: Kristine Hahn <kh...@maprtech.com>
Authored: Sat Sep 5 09:06:57 2015 -0700
Committer: Kristine Hahn <kh...@maprtech.com>
Committed: Sat Sep 5 11:15:22 2015 -0700

----------------------------------------------------------------------
 _docs/query-data/030-querying-hbase.md |  7 ++++---
 _docs/sql-reference/040-operators.md   | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/be2f2223/_docs/query-data/030-querying-hbase.md
----------------------------------------------------------------------
diff --git a/_docs/query-data/030-querying-hbase.md b/_docs/query-data/030-querying-hbase.md
index da7cb85..474d1fe 100644
--- a/_docs/query-data/030-querying-hbase.md
+++ b/_docs/query-data/030-querying-hbase.md
@@ -2,7 +2,8 @@
 title: "Querying HBase"
 parent: "Query Data"
 ---
-<!-- To use Drill to query HBase data, you need to understand how to work with the HBase byte arrays. If you want Drill to interpret the underlying HBase row key as something other than a byte array, you need to know the encoding of the data in HBase. By default, HBase stores data in little endian and Drill assumes the data is little endian, which is unsorted. The following table shows the sorting of typical rowkey IDs in bytes, encoded in little endian and big endian, respectively:
+<!-- 
+To use Drill to query HBase data, you need to understand how to work with the HBase byte arrays. If you want Drill to interpret the underlying HBase row key as something other than a byte array, you need to know the encoding of the data in HBase. By default, HBase stores data in little endian and Drill assumes the data is little endian, which is unsorted. The following table shows the sorting of typical rowkey IDs in bytes, encoded in little endian and big endian, respectively:
 
 | IDs in Byte Notation Little Endian Sorting | IDs in Decimal Notation | IDs in Byte Notation Big Endian Sorting | IDs in Decimal Notation |
 |--------------------------------------------|-------------------------|-----------------------------------------|-------------------------|
@@ -75,8 +76,8 @@ For more examples, see the [test code:](https://github.com/apache/drill/blob/956
 By taking advantage of ordered byte encoding, Drill 1.2 and later can performantly execute conditional queries without a secondary index on HBase big endian data. 
 
 ## Querying Little Endian-Encoded Data
-
-As mentioned earlier,  -->HBase stores data in little endian by default and Drill assumes the data is encoded in little endian. This exercise involves working with data that is encoded in little endian. First, you create two tables in HBase, students and clicks, that you can query with Drill. You use the CONVERT_TO and CONVERT_FROM functions to convert binary text to/from typed data. You use the CAST function to convert the binary data to an INT in step 4 of [Query HBase Tables]({{site.baseurl}}/docs/querying-hbase/#query-hbase-tables). When converting an INT or BIGINT number, having a byte count in the destination/source that does not match the byte count of the number in the binary source/destination, use CAST.
+ -->
+As mentioned earlier, HBase stores data in little endian by default and Drill assumes the data is encoded in little endian. This exercise involves working with data that is encoded in little endian. First, you create two tables in HBase, students and clicks, that you can query with Drill. You use the CONVERT_TO and CONVERT_FROM functions to convert binary text to/from typed data. You use the CAST function to convert the binary data to an INT in step 4 of [Query HBase Tables]({{site.baseurl}}/docs/querying-hbase/#query-hbase-tables). When converting an INT or BIGINT number, having a byte count in the destination/source that does not match the byte count of the number in the binary source/destination, use CAST.
 
 ### Create the HBase tables
 

http://git-wip-us.apache.org/repos/asf/drill/blob/be2f2223/_docs/sql-reference/040-operators.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/040-operators.md b/_docs/sql-reference/040-operators.md
index 4eb83f9..a502f01 100644
--- a/_docs/sql-reference/040-operators.md
+++ b/_docs/sql-reference/040-operators.md
@@ -13,6 +13,7 @@ You can use the following logical operators in your Drill queries:
   * BETWEEN
   * IN
   * LIKE
+  * ILIKE
   * NOT
   * OR 
 
@@ -38,6 +39,7 @@ You can use the following comparison operators in your Drill queries:
 You can use the following pattern matching operators in your Drill queries:
 
   * LIKE
+  * ILIKE
   * NOT LIKE
   * SIMILAR TO
   * NOT SIMILAR TO
@@ -73,3 +75,29 @@ The concatenate operator is an alternative to the [concat function]({{ site.base
 
 The concat function treats NULL as an empty string. The concatenate operator (||) returns NULL if any input is NULL.
 
+## Operator Precedence 
+
+The following table shows the precedence of operators in decreasing order:
+
+| Operator/Element                     | Associativity | Description                                                 |
+|--------------------------------------|---------------|-------------------------------------------------------------|
+| .                                    | left          | dot notation used, for example, to drill down in a JSON map |
+| [ ]                                  | left          | array-style notation to drill down into a JSON array        |
+| -                                    | right         | unary minus                                                 |
+| E                                    | left          | exponentiation                                              |
+| * / %                                | left          | multiplication, division, modulo                            |
+| + -                                  | left          | addition, subtraction                                       |
+| IS                                   |               | IS TRUE, IS FALSE, IS UNKNOWN, IS NULL                      |
+| IS NULL                              |               | test for null                                               |
+| IS NOT NULL                          |               | test for not null                                           |
+| (any other)                          | left          | all other native and user-defined operators                 |
+| IN                                   |               | set membership                                              |
+| BETWEEN                              |               | range containment                                           |
+| OVERLAPS                             |               | time interval overlap                                       |
+| LIKE ILIKE SIMILAR TO NOT SIMILAR TO |               | string pattern matching                                     |
+| < >                                  |               | less than, greater than                                     |
+| =                                    | right         | equality, assignment                                        |
+| NOT                                  | right         | logical negation                                            |
+| AND                                  | left          | logical conjunction                                         |
+| OR                                   | left          | logical disjunction                                         |
+