If a column name requires square brackets, e.g. due to a space or a period in the column name, toString() on the AST loses the brackets resulting in incorrect SQL.
For example
const ast = alasql.parse('SELECT [Foo Bar] FROM tbl');
console.log(ast.toString());
gives SELECT Foo Bar FROM tbl instead of SELECT [Foo Bar] FROM tbl
Similarly:
const ast = alasql.parse('SELECT [Foo.Bar] FROM tbl');
console.log(ast.toString());
gives SELECT Foo.Bar FROM tbl instead of SELECT [Foo.Bar] FROM tbl