graph icon indicating copy to clipboard operation
graph copied to clipboard

Change SQL version of Airports to use a larger field for the city name

Open krlawrence opened this issue 4 years ago • 0 comments

Since the data set was first created several cities have been added that have a name longer than the 20 characters allowed by the VARCHAR(20) in the airports table. Sqlite3 seems to ignore this and create the values anyway but other stores such as Postgres throw an error.

gremlin> g.V().hasLabel('airport').filter {it.get().value('city').size() > 20}.count()
==>92  

gremlin> g.V().hasLabel('airport').filter {it.get().value('city').size() > 35}.values('city')
==>Sta Cruz de la Palma, La Palma Island

gremlin> g.V().hasLabel('airport').filter {it.get().value('city').size() > 35}.values('city').map {it.get().size()}
==>37     

krlawrence avatar Apr 03 '21 13:04 krlawrence