You can verify which parts of your query are being vectorized using the explain feature. When For example, when Fetch is used in the plan instead of Map, it do not vectorize, For example see belowdoes not vectorize and the explain output will not include the "
Vectorized execution: true" notation:
create table vectorizedtable(state string,id int) stored as orc ; insert into vectorizedtable values('haryana',1); set hive.vectorized.execution.enabled = true; explain select count(*) from vectorizedtable;
the The explain output contains this:
Note: In case you want to use vectorized vectorized execution for fetch then
- Timestamps only work correctly with vectorized execution if the timestamp value is between 1677-09-20 and 2262-04-11. This limitation is due to the fact that a vectorized timestamp value is stored as a long value representing nanoseconds before/after the Unix Epoch time of 1970-01-01 00:00:00 UTC. Also see HIVE-9862.