Through reading code, I known some mechanism of LENS.
LENS don’t support CRUD ability on underlying HIVE or JDBC-compatible physical store. It set up a metastore on HIVE which is a ROLAP abstract model, we can do CRUD on this metastore. Query command is another process flow, will first do cost Analysis, then do rewrite, then send it to selected SQL engine.

Can you help to check whether I’m right?

在 2015/8/19 12:47, amareshwarisr . 写道:
Table and data are not required to be on all stores. The engine is selected wrt data availability first. Engine is selected on cost basis only if data is available in more than one store.

On Wed, Aug 19, 2015 at 10:03 AM, Wangfei (X) <[email protected] <mailto:[email protected]>> wrote:

    OK, thanks for your reply.
    I have another problem,
    Lens choose sql engine by cost, so it may send to HIVE or
    JDBC-compatible engine uncertainly.
    So every engine should have the same table schema and same data,
    how to guarantee it?


    在 2015/8/19 12:12, amareshwarisr . 写道:
    Yes. It can execute, it will fire it on the engine which accepts
    the query - in this case the engine should be able to access the
    table, then it would execute. Basically it will do explain of the
    query on the engine if it passes it will execute.

    See sample queries here -
    
https://github.com/apache/incubator-lens/blob/master/lens-examples/src/main/resources/dimension-queries.sql
    and
    
https://github.com/apache/incubator-lens/blob/master/lens-examples/src/main/resources/cube-queries.sql

    Some of the example queries put out there are native queries.

    Thanks
    Amareshwari

    On Tue, Aug 18, 2015 at 6:55 PM, Wangfei (X) <[email protected]
    <mailto:[email protected]>> wrote:

        Hello, I want to ask a question about lens.
            Does lens support query like "query execute  select
        id,name from dim_table where name != ""first"" " ,
           that is , there is no "cube" keyword in the query, whether
        this query will send to HIVE or JDBC-Compatible engine,
           which will not send to OLAP Cube Metastore. I try to find
        out this problem through reading code, but I'm not sure about it.





Reply via email to