You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Manish Maheshwari (Jira)" <ji...@apache.org> on 2024/06/03 16:29:00 UTC

[jira] [Updated] (IMPALA-12981) Support a column list in compute stats that is retrieved via a subquery

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

Manish Maheshwari updated IMPALA-12981:
---------------------------------------
    Description: 
Support a column list in compute stats that is retrived via a subquery - Specifically we want to use Impala query history tables where we collect the columns in a table that are using for joins, aggegrates, filters etc to be passed into compute stats command.

Ideally the way that we would want it to work is that generate a table from the query history table that has the most frequent table and most frequent columns accessed  and then feed them into the compute stats command. 

 

Suggested Syntax - 
{code:java}
Table Level - 
compute stats db.tbl (
select distinct join_columns from
from sys.impala_query_log
where contains(tables_queried, "db.tbl")
and query_dttm >current_timestamp()-7
and join_columns rlike 'db.tbl'
) 

Across Tables - 
compute stats on (select tables, columns from sys.impala_query_log where query_dttm > current_timestamp()-7 group tables, columns by order by tables, columns, count(1) desc having count(1) > 1000  )

{code}
 

  was:
Support a column list in compute stats that is retrived via a subquery - Specifically we want to use Impala query history tables where we collect the columns in a table that are using for joins, aggegrates, filters etc to be passed into compute stats command - 

Suggested Syntax - 
{code:java}
compute stats db.tbl (
select distinct join_columns from
from sys.impala_query_log
where contains(tables_queried, "db.tbl")
and query_dttm >current_timestamp()-7
and join_columns rlike 'db.tbl'
) {code}
 


> Support a column list in compute stats that is retrieved via a subquery  
> -------------------------------------------------------------------------
>
>                 Key: IMPALA-12981
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12981
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend, Frontend
>            Reporter: Manish Maheshwari
>            Priority: Major
>
> Support a column list in compute stats that is retrived via a subquery - Specifically we want to use Impala query history tables where we collect the columns in a table that are using for joins, aggegrates, filters etc to be passed into compute stats command.
> Ideally the way that we would want it to work is that generate a table from the query history table that has the most frequent table and most frequent columns accessed  and then feed them into the compute stats command. 
>  
> Suggested Syntax - 
> {code:java}
> Table Level - 
> compute stats db.tbl (
> select distinct join_columns from
> from sys.impala_query_log
> where contains(tables_queried, "db.tbl")
> and query_dttm >current_timestamp()-7
> and join_columns rlike 'db.tbl'
> ) 
> Across Tables - 
> compute stats on (select tables, columns from sys.impala_query_log where query_dttm > current_timestamp()-7 group tables, columns by order by tables, columns, count(1) desc having count(1) > 1000  )
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org