scala - Why is predicate pushdown not working? -
programm sketch
- i create hivecontext
hivecontext. - with context, create dataframe
dfjdbc relational table. - i register dataframe
dfviadf.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
Post a Comment