scala - Why is predicate pushdown not working? -


programm sketch

  • i create hivecontext hivecontext.
  • with context, create dataframe df jdbc relational table.
  • i register dataframe df via df.registertemptable("testtable").
  • i start hivethriftserver2 via hivethriftserver2.startwithcontext(hivecontext).

the testtable contains 1,000,000 entries, columns id (int) , name (varchar)

+-----+--------+ | id  |  name  | +-----+--------+ | 1   | hello  | | 2   | hello  | | 3   | hello  | | ... | ...    | 

with beeline access sql endpoint (at port 10000) of hivethriftserver , perform query. e.g.

select * testtable id='3' 

when inspect querylog of db sql statements executed see

/*sql #:1000000 t:657*/  select \"id\",\"name\" test; 

so there happens no predicate pushdown , clause missing.

questions

this gives raise following questions:

  • why no predicate pushdown performed?
  • can changed not using registertemptable?
  • if so, how? or known restriction of hivethriftserver?

counterexample

if create dataframe df in spark sqlcontext , call

df.filter( df("id") === 3).show() 

i observe

/*sql #:1*/select \"id\",\"name\" test id = 3; 

as expected.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -