Skip to content

Commit e167765

Browse files
committed
fix data type "interval year to month" code spelling
1 parent b60f5cf commit e167765

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

lexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ var unReservedKeyword = map[string]int{
235235
"metadata": _metadata,
236236
"minextents": _minextents,
237237
"minvalue": _minvalue,
238-
"mouth": _mouth,
238+
"month": _month,
239239
"multivalue": _multivalue,
240240
"national": _national,
241241
"nchar": _nchar,

sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sql.y

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func nextQuery(yylex interface{}) string {
185185
_metadata
186186
_minextents
187187
_minvalue
188-
_mouth
188+
_month
189189
_multivalue
190190
_national
191191
_nchar
@@ -541,7 +541,7 @@ UnReservedKeyword:
541541
| _metadata
542542
| _minextents
543543
| _minvalue
544-
| _mouth
544+
| _month
545545
| _multivalue
546546
| _national
547547
| _nchar
@@ -1908,13 +1908,13 @@ DatetimeDataTypes:
19081908
d.SetDataDef(element.DataDefTimestamp)
19091909
$$ = d
19101910
}
1911-
| _interval _year _to _mouth
1911+
| _interval _year _to _month
19121912
{
19131913
d := &element.IntervalYear{}
19141914
d.SetDataDef(element.DataDefIntervalYear)
19151915
$$ = d
19161916
}
1917-
| _interval _year '(' _intNumber ')' _to _mouth
1917+
| _interval _year '(' _intNumber ')' _to _month
19181918
{
19191919
precision := $4
19201920
d := &element.IntervalYear{Precision: &precision}

test/create_table.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ CREATE TABLE test."persons" ( NUMERIC_NAME NUMERIC ( 15, 2 ), Decimal_NAME DECIM
2424

2525
create table TEST.T21 (t CHAR(255));
2626

27-
create table TEST.T21 (t character(255));
27+
create table TEST.T21 (t character(255));
28+
29+
CREATE TABLE TEST.INTERVAL_YEAR_COLUMNS(ID INT, C_INTERVAL_YEAR INTERVAL YEAR TO MONTH);
30+
31+
CREATE TABLE TEST.INTERVAL_YEAR_COLUMNS(ID INT, C_INTERVAL_YEAR INTERVAL YEAR(3) TO MONTH);

0 commit comments

Comments
 (0)