Skip to content

Commit b9fec00

Browse files
committed
On the "all-types" validation, use char instead of character
With an aliasing to `char`, the response is: cr> select char as "char" from t01; SQLParseException[line 1:16: no viable alternative at input 'select char as "char"'] It apparently works with all other symbol names, it just trips on `char`.
1 parent 82cb581 commit b9fec00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

by-dataframe/sqlframe/example_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def connect_spark():
4949
bit="01010101",
5050
bool=True,
5151
text="foobar",
52-
character="foo",
52+
char="foo",
5353
timestamp_tz="1970-01-02T00:00:00+01:00",
5454
timestamp_notz="1970-01-02T00:00:00",
5555
ip="127.0.0.1",
@@ -64,7 +64,7 @@ def connect_spark():
6464
RECORD_OUT = deepcopy(RECORD_IN)
6565
RECORD_OUT.update(
6666
dict(
67-
character="foo ",
67+
char="foo ",
6868
timestamp_tz=dt.datetime(1970, 1, 1, 23, 0, tzinfo=dt.timezone.utc),
6969
timestamp_notz=dt.datetime(1970, 1, 2, 0, 0, tzinfo=dt.timezone.utc),
7070
# FIXME: `geopoint` comes back as string, `'(85.42999997735023,66.22999997343868)'`
@@ -106,7 +106,7 @@ def sqlframe_ddl_dml_dql():
106106
bit BIT(8),
107107
bool BOOLEAN,
108108
text TEXT,
109-
character CHARACTER(5),
109+
char CHAR(5),
110110
timestamp_tz TIMESTAMP WITH TIME ZONE,
111111
timestamp_notz TIMESTAMP WITHOUT TIME ZONE,
112112
ip IP,

0 commit comments

Comments
 (0)