Skip to content

Commit

Permalink
sql: reference cockroachdb#32564 for INTERVAL with precision
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
knz committed Nov 28, 2018
1 parent 4fad432 commit 704808e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/server/updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func TestReportUsage(t *testing.T) {

"unimplemented.pg_catalog.pg_stat_wal_receiver": 10,
"unimplemented.syntax.#32555": 10,
"unimplemented.syntax.interval with precision": 10,
"unimplemented.syntax.#32564": 10,
"unimplemented.#9148": 10,
"internalerror.": 10,
"othererror.builtins.go": 10,
Expand Down
6 changes: 3 additions & 3 deletions pkg/sql/parser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2652,12 +2652,12 @@ func TestUnimplementedSyntax(t *testing.T) {
{`SELECT 123 AT TIME ZONE 'b'`, 32005, ``},

{`SELECT 'a'::INTERVAL SECOND`, 0, `interval with unit qualifier`},
{`SELECT 'a'::INTERVAL(123)`, 0, `interval with precision`},
{`SELECT 'a'::INTERVAL SECOND(123)`, 0, `interval second with precision`},
{`SELECT 'a'::INTERVAL(123)`, 32564, ``},
{`SELECT 'a'::INTERVAL SECOND(123)`, 32564, `interval second`},
{`SELECT (a,b) OVERLAPS (c,d)`, 0, `overlaps`},
{`SELECT UNIQUE (SELECT b)`, 0, `UNIQUE predicate`},
{`SELECT a(b) 'c'`, 0, `a(...) SCONST`},
{`SELECT INTERVAL(3) 'a'`, 0, `expr_const const_interval`},
{`SELECT INTERVAL(3) 'a'`, 32564, ``},
{`SELECT GROUPING (a,b,c)`, 0, `d_expr grouping`},
{`SELECT a(VARIADIC b)`, 0, `variadic`},
{`SELECT a(b, c, VARIADIC b)`, 0, `variadic`},
Expand Down
6 changes: 3 additions & 3 deletions pkg/sql/parser/sql.y
Original file line number Diff line number Diff line change
Expand Up @@ -6082,7 +6082,7 @@ simple_typename:
| character_with_length
| const_interval
| const_interval interval_qualifier { return unimplemented(sqllex, "interval with unit qualifier") }
| const_interval '(' ICONST ')' { return unimplemented(sqllex, "interval with precision") }
| const_interval '(' ICONST ')' { return unimplementedWithIssue(sqllex, 32564) }
// We have a separate const_typename to allow defaulting fixed-length types
// such as CHAR() and BIT() to an unspecified length. SQL9x requires that these
Expand Down Expand Up @@ -6507,7 +6507,7 @@ interval_second:
{
$$.val = tree.Second
}
| SECOND '(' ICONST ')' { return unimplemented(sqllex, "interval second with precision") }
| SECOND '(' ICONST ')' { return unimplementedWithIssueDetail(sqllex, 32564, "interval second") }

// General expressions. This is the heart of the expression syntax.
//
Expand Down Expand Up @@ -7093,7 +7093,7 @@ d_expr:
{
$$.val = $1.expr()
}
| const_interval '(' ICONST ')' SCONST { return unimplemented(sqllex, "expr_const const_interval") }
| const_interval '(' ICONST ')' SCONST { return unimplementedWithIssue(sqllex, 32564) }
| TRUE
{
$$.val = tree.MakeDBool(true)
Expand Down

0 comments on commit 704808e

Please sign in to comment.