Can you explain when and why mapreduce is invoked in hive

前端 未结 3 1262
萌比男神i
萌比男神i 2020-12-14 12:27
  1. select * from Table_name limit 5;

  2. select col1_name,col2_name from table_name limit 5;

When i run the fi

3条回答
  •  死守一世寂寞
    2020-12-14 13:14

    Its logical.

    In first query ,only thing to be done is --dump the data with limit of 5 (which means take any 5 numbers of rows to be dumped ).Nothing to be done with processing with specific type of query. (other than knowing how rows are seperated);

    but in second query a map - reduce job is to be there . why ?? because first it has to process the data to know how many different columns are .than to know whether col1 and col1 really exists or there is only one col in it . if exists than it has to eliminate other columns first and than in remaining columns it has to take only five rows in it

提交回复
热议问题