implemented internal-only ``cast`` function
added implicit type casting on insert with subselect
insert by query plan WIP