Sync changes from https://github.com/julianhyde/phoenix/tree/calcite
Sync changes from https://github.com/julianhyde/phoenix/tree/calcite