diff --git a/README.md b/README.md index 62d22ed65..beb78bc67 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ We support and actively test against certain third-party clients to ensure compa |`DAYOFWEEK(date)`|Returns the day of the week of the given date.| |`DAYOFYEAR(date)`|Returns the day of the year of the given date.| |`FLOOR(number)`|Return the largest integer value that is less than or equal to `number`.| +|`FROM_BASE64(str)`|Decodes the base64-encoded string str.| |`HOUR(date)`|Returns the hours of the given date.| |`IFNULL(expr1, expr2)`|If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2.| |`IS_BINARY(blob)`|Returns whether a BLOB is a binary file or not.| @@ -107,7 +108,6 @@ We support and actively test against certain third-party clients to ensure compa |`SUBSTRING(str, pos, [len])`|Return a substring from the provided string starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.| |`SUM(expr)`|Returns the sum of expr in all rows.| |`TO_BASE64(str)`|Encodes the string str in base64 format.| -|`FROM_BASE64(str)`|Decodes the base64-encoded string str.| |`TRIM(str)`|Returns the string str with all spaces removed.| |`UPPER(str)`|Returns the string str with all characters in upper case.| |`WEEKDAY(date)`|Returns the weekday of the given date.| diff --git a/engine_test.go b/engine_test.go index e6a676b37..f3dcc966c 100644 --- a/engine_test.go +++ b/engine_test.go @@ -909,14 +909,6 @@ var queries = []struct { "SELECT FROM_BASE64('YmFy')", []sql.Row{{string("bar")}}, }, - { - "SELECT DISTINCT 1, 2", - []sql.Row{{int64(1), int64(2)}}, - }, - { - "SELECT DISTINCT(1,2)", - []sql.Row{}, - }, } func TestQueries(t *testing.T) { diff --git a/sql/analyzer/optimization_rules.go b/sql/analyzer/optimization_rules.go index 3de847b7e..f8795348b 100644 --- a/sql/analyzer/optimization_rules.go +++ b/sql/analyzer/optimization_rules.go @@ -1,7 +1,7 @@ package analyzer import ( - "gopkg.in/src-d/go-errors.v1" + errors "gopkg.in/src-d/go-errors.v1" "gopkg.in/src-d/go-mysql-server.v0/sql" "gopkg.in/src-d/go-mysql-server.v0/sql/expression" "gopkg.in/src-d/go-mysql-server.v0/sql/plan" @@ -33,7 +33,6 @@ func optimizeDistinct(ctx *sql.Context, a *Analyzer, node sql.Node) (sql.Node, e defer span.Finish() a.Log("optimize distinct, node of type: %T", node) - if node, ok := node.(*plan.Distinct); ok { var isSorted bool _, _ = node.TransformUp(func(node sql.Node) (sql.Node, error) { diff --git a/sql/analyzer/validation_rules.go b/sql/analyzer/validation_rules.go index cc6cfa65f..500b3608c 100644 --- a/sql/analyzer/validation_rules.go +++ b/sql/analyzer/validation_rules.go @@ -3,7 +3,7 @@ package analyzer import ( "strings" - "gopkg.in/src-d/go-errors.v1" + errors "gopkg.in/src-d/go-errors.v1" "gopkg.in/src-d/go-mysql-server.v0/sql" "gopkg.in/src-d/go-mysql-server.v0/sql/expression" "gopkg.in/src-d/go-mysql-server.v0/sql/plan"