Merge pull request #893 from crate/m/insert-by-query-plan

implemented insert-by-query plan