You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Bikramjeet Vig (JIRA)" <ji...@apache.org> on 2018/01/02 18:58:00 UTC

[jira] [Resolved] (IMPALA-6177) Clean up handcrafted IRs if they encounter error during creation

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

Bikramjeet Vig resolved IMPALA-6177.
------------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 2.12.0

https://github.com/apache/impala/commit/4a45c829bd8e5c5bedc434e87bd2a1d19b7d44e6

IMPALA-6177: Cleanup incomplete handcrafted IRs before finalizing module
Currently, if an error is encountered during the creation of a
handcrafted codegen method, then the resulting IR is left in an
incomplete state. This patch ensures that all such IRs are cleaned up
(method is deleted from the module) before the llvm module is finalized.

Testing:
- added a backend test to exercise the added code path.
- tested manually by executing the following query:
select * from charTable A, charTable B
where A.charColumn = B.charColumn and A.charColumn = 'foo';
and looking at the logs to verify that 'InsertRuntimeFilters' and
'FilterContextInsert' methods have been removed.

Change-Id: If975cfb3906482b36dd6ede32ca81de6fcee1d7f
Reviewed-on: http://gerrit.cloudera.org:8080/8541
Reviewed-by: Bikramjeet Vig <bi...@cloudera.com>
Tested-by: Impala Public Jenkins

> Clean up handcrafted IRs if they encounter error during creation
> ----------------------------------------------------------------
>
>                 Key: IMPALA-6177
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6177
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Bikramjeet Vig
>            Assignee: Bikramjeet Vig
>             Fix For: Impala 2.12.0
>
>
> Some Codegen() calls in exec nodes might encounter an error and return early. This cause a half baked/ malformed IR to be generated that could likely add to query compilation time.
> An example would be in the case of a table with a column of char datatype and query:
> {code:sql}
> select * from charTable A, charTable B where A.charColumn = B.charColumn and A.charColumn = 'foo';
> {code}
> this query tries to create a runtime filter for the char column, but returns in the middle of crafting the IR because it realizes that 'char' type is not supported. This cause an incomplete IR to be created that looks like this:
> {noformat}
> define void @InsertRuntimeFilters(%"class.impala::PhjBuilder"* %this, %"class.impala::TupleRow"* %row) {
> entry:
> }
> {noformat}
> the objective of this task would be to identify such cases and clean up and remove such incomplete IR methods from the module.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)