impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IMPALA-5479) Propagate the argument 'type' for RawValue::Compare()
Date Sat, 10 Jun 2017 05:13:19 GMT

     [ https://issues.apache.org/jira/browse/IMPALA-5479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Ho resolved IMPALA-5479.
--------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 2.9.0

IMPALA-5479: Propagate the argument type in RawValue::Compare()
CodegenAnyVal::Compare() generates code which calls the cross
compiled version of RawValue::Compare() without propagating
the type information into RawValue::Compare(). As a result,
the generated code of RawValue::Compare() is not any more
efficient than the interpreted version as we still have
the big switch statement in it.

This change creates a global constant for the argument 'type'
passed to RawValue::Compare(). By inlining the call to
RawValue::Compare(), LLVM was able to constant propagate
the type and eliminate the dead code for non-target types.

With this change, a query with top-n improves by 12% on average:

select l_orderkey, l_partkey, l_suppkey
from tpch50_parquet.lineitem
order by l_orderkey, l_partkey, l_suppkey
limit 10000;

4.49s -> 3.95s

This change also adds the ALWAYS_INLINE attribute to
RuntimeFilter::Eval() as it's needed to propagate the type
after a recent change to not put ALWAYS_INLINE attribute
on all cross-compiled functions.

Change-Id: I10b5b284e3da03024476a9620a12d6e7fbf08b3c
Reviewed-on: http://gerrit.cloudera.org:8080/7140
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins


> Propagate the argument 'type' for RawValue::Compare()
> -----------------------------------------------------
>
>                 Key: IMPALA-5479
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5479
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.9.0
>            Reporter: Michael Ho
>            Assignee: Michael Ho
>            Priority: Minor
>              Labels: codegen
>             Fix For: Impala 2.9.0
>
>
> CodegenAnyVal::Compare() generates code which calls the cross
> compiled version of RawValue::Compare() without propagating
> the type information into RawValue::Compare(). As a result,
> the generated code of RawValue::Compare() is not any more
> efficient than the interpreted version as we still have
> the big switch statement in it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message