New Crate Release: 0.46.5 (Stable)

Author
Kenan
Date
February 6, 2015

We're pleased to announce that Crate 0.46.5 is now stable. You can find a summary of changes in the CHANGES.txt file in our GitHub repository. If you find this to not be the case, please do not hesitate to contact us and let us know.

In v0.46.5 we have added quite a few new features, we shall show off the most interesting ones here:

  • Support for user defined schemata
  • Support for column policies
  • Error handling when selecting non-existent root columns

Also we have upgraded Elasticsearch from 1.3.6 to 1.4.2.

Support for user defined schemata

Crate now supports user defined schemas, please note: schemas are primarily namespaces for tables. There is no notion of access control. Everybody can see and manipulate tables in every schema.

cr> create table my_schema.my_table_1 (name string, value float);
CREATE OK, 1 row affected (0.000 sec)

cr> select * from information_schema.schemata;
+--------------------+
| schema_name        |
+--------------------+
| blob               |
| my_schema          |
| information_schema |
| sys                |
| doc                |
+--------------------+

Here we can see the list of schemas, "blob", "information_schema", "sys" and "doc" are default schemas. Every table that is created without an explicit schema name, will be created in the doc schema.

A user created schema exists as long as there are tables with the same schema name. If the last table with that schema is dropped, the schema is gone (except for the blob and doc schema):

cr> drop table my_schema.my_table_1;
cr> select * from information_schema.schemata;
+--------------------+
| schema_name        |
+--------------------+
| blob               |
| information_schema |
| sys                |
| doc                |
+--------------------+

Error handling when selecting non-existent root columns

cr> create table foo (name string, value float);
CREATE OK, 1 row affected (0.000 sec)

When trying to select a non-existent root column now we we get an error message, before it has been returning a NULL value.

cr> select name, attributes from foo;
SQLActionException[Column attributes unknown]

Support for column policies

The Column Policy defines if a table enforces its defined schema or if it’s allowed to store additional columns which are a not defined in the table schema. If the column policy is not defined within the with clause, dynamic will be used.

cr> create table my_table1 (
...   title string,
...   author string
... ) with (column_policy = 'strict');
CREATE OK, 1 row affected (0.000 sec)

If we insert a new column, we will get an exception:

cr> insert into my_table1 (title, author, date)
... values ('Steppenwolf', 'Herman Hesse', '1927')
... ;
SQLActionException[Column date unknown]

In case we use a 'dynamic column policy', a new column will be created automatically:

cr> create table my_table2 (           
... title string,                      
... author string                      
... ) with (column_policy = 'dynamic');
CREATE OK, 1 row affected (0.000 sec)

cr> insert into my_table2 (title, author, date)
... values ('Steppenwolf', 'Herman Hesse', '1927')
... ;
INSERT OK, 1 row affected (0.000 sec)

Elasticsearch update

We updated our Elasticsearch fork from 1.3.4 to the latest version 1.4.2, ES changelog.

That’s all we have to report today, see you next release!

~Kenan & the CrateIO Team

Back to topAll posts