Currently, FunSQL tracks the names and the order of the output columns, but it does not distinguishes their types.
To fix this, FunSQL needs to:
Introspect the types of table columns and preserve them in the catalog;
Implement type resolution for SQL functions and operators.
Column information could be stored in a structure SQLColumn(name, type) with SQLTable.columns becoming an OrderedDict{Symbol, SQLColumn}. Accidentally, it will allow a column to have a FunSQL name that differs from its SQL name.
It is much harder to implement type resolution for arbitrary expressions. We could start by allowing the user to explicitly declare the result type of a particular function or an operator call.
Currently, FunSQL tracks the names and the order of the output columns, but it does not distinguishes their types.
To fix this, FunSQL needs to:
Column information could be stored in a structure
SQLColumn(name, type)
withSQLTable.columns
becoming anOrderedDict{Symbol, SQLColumn}
. Accidentally, it will allow a column to have a FunSQL name that differs from its SQL name.It is much harder to implement type resolution for arbitrary expressions. We could start by allowing the user to explicitly declare the result type of a particular function or an operator call.