[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Michael Smith (Code Review)
Michael Smith has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Reviewed-on: http://gerrit.cloudera.org:8080/21302
Reviewed-by: Riza Suminto 
Tested-by: Impala Public Jenkins 
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
D 
testdata/workloads/functional-planner/queries/PlannerTest/impala-query-live.test
M tests/custom_cluster/test_query_live.py
26 files changed, 435 insertions(+), 294 deletions(-)

Approvals:
  Riza Suminto: Looks good to me, approved
  Impala Public Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 16
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 15: Verified+1


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 23:17:13 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 15:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/15/tests/custom_cluster/test_query_live.py
File tests/custom_cluster/test_query_live.py:

http://gerrit.cloudera.org:8080/#/c/21302/15/tests/custom_cluster/test_query_live.py@154
PS15, Line 154: # Drop table at the end, it's only recreated on impalad startup.
> nit: I wonder what will happen in multi-coordinator cluster if this table i
I haven't seen this be an issue. Same thing that would happen with any other 
table that one coordinator drops and another tries to access.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 19:08:38 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 15: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/15/tests/custom_cluster/test_query_live.py
File tests/custom_cluster/test_query_live.py:

http://gerrit.cloudera.org:8080/#/c/21302/15/tests/custom_cluster/test_query_live.py@154
PS15, Line 154: # Drop table at the end, it's only recreated on impalad startup.
nit: I wonder what will happen in multi-coordinator cluster if this table is 
dropped from one coordinator and accessed from the other. If that is something 
that we need to address in the future (ie., prevent it from being dropped), 
please leave TODO comment. Otherwise, LGTM.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 19:05:31 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 15:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16036/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 18:36:36 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 15:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py
File tests/custom_cluster/test_query_live.py:

http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py@137
PS14, Line 137: insert_result = self.execute_query_expect_failure(self.client,
  : 'insert into sys.impala_query_live select * from 
sys.impala_query_live limit 1')
> Because it's in HMS, drop table actually succeeds. It gets recreated the ne
Done



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 18:13:24 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#15).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
D 
testdata/workloads/functional-planner/queries/PlannerTest/impala-query-live.test
M tests/custom_cluster/test_query_live.py
26 files changed, 435 insertions(+), 294 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/15
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 15:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/10584/ 
DRY_RUN=true


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 18:14:10 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 14:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/14/fe/src/test/java/org/apache/impala/planner/PlannerTest.java
File fe/src/test/java/org/apache/impala/planner/PlannerTest.java:

http://gerrit.cloudera.org:8080/#/c/21302/14/fe/src/test/java/org/apache/impala/planner/PlannerTest.java@a1560
PS14, Line 1560:
This set of tests no longer worked because they require catalogd have 
enable_workload_mgmt=true. Previously SystemTables were handled entirely local 
and didn't interact with HMS/catalogd.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 17:28:17 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-26 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 14:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py
File tests/custom_cluster/test_query_live.py:

http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py@132
PS14, Line 132: insert_result
> nit: create_result?
Ack


http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py@137
PS14, Line 137: insert_result = self.execute_query_expect_failure(self.client,
  : 'insert into sys.impala_query_live select * from 
sys.impala_query_live limit 1')
> nit: missing "drop table" test?
Because it's in HMS, drop table actually succeeds. It gets recreated the next 
time Impala starts up. I could put one at the end of this case demonstrating 
that.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 17:18:23 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 14:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py
File tests/custom_cluster/test_query_live.py:

http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py@132
PS14, Line 132: insert_result
nit: create_result?


http://gerrit.cloudera.org:8080/#/c/21302/14/tests/custom_cluster/test_query_live.py@137
PS14, Line 137: insert_result = self.execute_query_expect_failure(self.client,
  : 'insert into sys.impala_query_live select * from 
sys.impala_query_live limit 1')
nit: missing "drop table" test?



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 00:44:47 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 14:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16030/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 26 Apr 2024 00:25:40 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#14).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
D 
testdata/workloads/functional-planner/queries/PlannerTest/impala-query-live.test
M tests/custom_cluster/test_query_live.py
26 files changed, 432 insertions(+), 294 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/14
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 13: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/10581/


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 13
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 23:38:03 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 13:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/10581/ 
DRY_RUN=false


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 13
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 18:39:05 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 13: Code-Review+2


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 13
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 18:39:04 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 11:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16019/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 17:17:50 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 12:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16020/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 12
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 17:17:25 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 12: Code-Review+2

LGTM. Carry Andrew's +2.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 12
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 17:07:46 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 10:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16017/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 16:57:25 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 11:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/8/common/thrift/CatalogObjects.thrift
File common/thrift/CatalogObjects.thrift:

http://gerrit.cloudera.org:8080/#/c/21302/8/common/thrift/CatalogObjects.thrift@676
PS8, Line 676: // These are used as the table name, so should
> Is this comment still valid, or the table name is lowercase(TSystemTableNam
Done


http://gerrit.cloudera.org:8080/#/c/21302/8/common/thrift/CatalogObjects.thrift@678
PS8, Line 678: IMPALA_QUERY_LIVE = 0
> Please add comment for TSystemTableName and TQueryTableColumn to not change
Done



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 16:53:05 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#12).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
24 files changed, 427 insertions(+), 248 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/12
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 12
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#11).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
24 files changed, 427 insertions(+), 248 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/11
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-25 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#10).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
24 files changed, 424 insertions(+), 248 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/10
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 9:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16013/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 25 Apr 2024 00:07:16 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 9:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/8/common/thrift/CatalogObjects.thrift
File common/thrift/CatalogObjects.thrift:

http://gerrit.cloudera.org:8080/#/c/21302/8/common/thrift/CatalogObjects.thrift@676
PS8, Line 676: // Table names can be found in SystemTable.java
Is this comment still valid, or the table name is lowercase(TSystemTableName)?


http://gerrit.cloudera.org:8080/#/c/21302/8/common/thrift/CatalogObjects.thrift@678
PS8, Line 678: IMPALA_QUERY_LIVE = 0
Please add comment for TSystemTableName and TQueryTableColumn to not change 
their enum value identifiers, since they are matter now.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Wed, 24 Apr 2024 23:56:04 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 9:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc@326
PS8, Line 326: log_table_
> Nit: now that we are dealing with 2 tables, rename variable to query_log or
Done


http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc@333
PS8, Line 333:   ABORT_IF_ERROR(SetupDb(internal_server_.get()));
> This TODO isn't needed.
Done



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Wed, 24 Apr 2024 23:42:58 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#9).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
23 files changed, 417 insertions(+), 246 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/9
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc@333
PS8, Line 333:   // TODO: make impala_query_live a flag and pass to frontend
This TODO isn't needed.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Wed, 24 Apr 2024 23:36:27 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Andrew Sherman (Code Review)
Andrew Sherman has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 8: Code-Review+2

(1 comment)

LGTM

http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/8/be/src/service/workload-management.cc@326
PS8, Line 326: table_name
Nit: now that we are dealing with 2 tables, rename variable to query_log or 
query_log_table



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Wed, 24 Apr 2024 23:34:11 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 8:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16011/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Wed, 24 Apr 2024 23:36:22 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-24 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#8).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Makes System Tables work with local catalog mode, fixing

  LocalCatalogException: Unknown table type for table sys.impala_query_live

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
A fe/src/main/java/org/apache/impala/catalog/FeSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
A fe/src/main/java/org/apache/impala/catalog/local/LocalSystemTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/planner/SystemTableScanNode.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
23 files changed, 412 insertions(+), 241 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/8
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-19 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 6: Code-Review+1


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Fri, 19 Apr 2024 15:56:59 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 6:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/15952/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 21:46:00 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 5:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/21302/2/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/2/be/src/service/workload-management.cc@116
PS2, Line 116: ble by generati
> Yes, that's why I changed them. I guess I can do that instead. According to
Done


http://gerrit.cloudera.org:8080/#/c/21302/2/common/thrift/SystemTables.thrift
File common/thrift/SystemTables.thrift:

http://gerrit.cloudera.org:8080/#/c/21302/2/common/thrift/SystemTables.thrift@23
PS2, Line 23: CLUSTER_ID
: QUERY_ID
> Just going to go back to unassigned. There's a DCHECK that asserts these ar
Done


http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS2, Line 59:   TImpalaTableProperty.__IMPALA_SYSTEM_TABLE.toString());
> I don't think so. I was looking at DataSourceTable for this pattern.
Added to CatalogObjects.thrift.


http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS4, Line 59:   TImpalaTableProperty.__IMPALA_SYSTEM_TABLE.toString());
> Yeah, I think const string with TBL_PROP_ prefix is better. A property key
Done



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 21:20:34 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#6).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
17 files changed, 243 insertions(+), 228 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/6
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 5:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/15949/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:18:23 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS4, Line 59:   TImpalaTableProperty.__IMPALA_SYSTEM_TABLE.toString());
> Moved this property to CatalogObjects.thrift. I forgot about that as a simp
Yeah, I think const string with TBL_PROP_ prefix is better. A property key may 
have dot or other char that is not valid as Thrift identifier. We have few of 
those const string already.

$ git grep -n "const string" common/thrift/
common/thrift/CatalogService.thrift:44:const string CATALOG_TOPIC_V1_PREFIX = 
"1:";
common/thrift/CatalogService.thrift:48:const string CATALOG_TOPIC_V2_PREFIX = 
"2:";
common/thrift/hive-1-api/TCLIService.thrift:184:const string 
CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength"
common/thrift/hive-1-api/TCLIService.thrift:187:const string PRECISION = 
"precision"
common/thrift/hive-1-api/TCLIService.thrift:188:const string SCALE = "scale"



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:16:29 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 5:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
File fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java@28
PS4, Line 28: Currently COMPUTE STATS does not work on these tables,
> That was previously prevented by having read-only access. But that's probab
Done


http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS4, Line 59:   TImpalaTableProperty.__IMPALA_SYSTEM_TABLE.toString());
> I think it is time we should organize all impala-specific table properties
Moved this property to CatalogObjects.thrift. I forgot about that as a simple 
place to define common values.

Although maybe it'd make more sense as a 'const string' than an enum.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 17:56:20 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Quanlong Huang, Riza Suminto, Jason Fehr, Wenzhe Zhou, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#5).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/CatalogObjects.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
M fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
17 files changed, 247 insertions(+), 229 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/5
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21302/4/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/4/be/src/service/workload-management.cc@300
PS4, Line 300: field.db_column
> This need lowercase as well?
Ack


http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
File fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java@28
PS4, Line 28: Currently COMPUTE STATS does not work on these tables.
> Question: is UPDATE/DELETE/TRUNCATE allowed for SystemTable?
That was previously prevented by having read-only access. But that's probably 
no longer true, so I need to look into preventing those.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 17:54:14 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-18 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 4:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/21302/4/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/4/be/src/service/workload-management.cc@300
PS4, Line 300: field.db_column
This need lowercase as well?


http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
File fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java@28
PS4, Line 28: Currently COMPUTE STATS does not work on these tables.
Question: is UPDATE/DELETE/TRUNCATE allowed for SystemTable?


http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/4/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS4, Line 59: public static final String TBL_PROP_SYSTEM_TABLE = 
"__IMPALA_SYSTEM_TABLE";
I think it is time we should organize all impala-specific table properties into 
one place, say, as a list of string constant in CatalogObjects.thrift. Is it 
the first time we have table property key referred both in FE and BE code?

Currently, they are scattered around FE source code like FeTable.java and 
others:

$ git grep -n "static.* TBL_PROP_" | cat
fe/src/main/java/org/apache/impala/analysis/AlterTableSortByStmt.java:42:  
public static final String TBL_PROP_SORT_COLUMNS = "sort.columns";
fe/src/main/java/org/apache/impala/analysis/AlterTableSortByStmt.java:43:  
public static final String TBL_PROP_SORT_ORDER = "sort.order";
fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java:64:  public 
static final String TBL_PROP_DATA_SRC_NAME = "__IMPALA_DATA_SOURCE_NAME";
fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java:69:  public 
static final String TBL_PROP_INIT_STRING = "__IMPALA_DATA_SOURCE_INIT_STRING";
fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java:74:  public 
static final String TBL_PROP_LOCATION = "__IMPALA_DATA_SOURCE_LOCATION";
fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java:79:  public 
static final String TBL_PROP_CLASS = "__IMPALA_DATA_SOURCE_CLASS";
fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java:84:  public 
static final String TBL_PROP_API_VER = "__IMPALA_DATA_SOURCE_API_VERSION";
fe/src/main/java/org/apache/impala/catalog/FeFsTable.java:381:public static 
final String TBL_PROP_SKIP_HEADER_LINE_COUNT = "skip.header.line.count";
fe/src/main/java/org/apache/impala/catalog/HdfsTable.java:168:  public static 
final String TBL_PROP_ENABLE_STATS_EXTRAPOLATION =
fe/src/main/java/org/apache/impala/catalog/HdfsTable.java:175:  public static 
final String TBL_PROP_DISABLE_RECURSIVE_LISTING =
fe/src/main/java/org/apache/impala/catalog/Table.java:188:  public static final 
String TBL_PROP_LAST_DDL_TIME = "transient_lastDdlTime";
fe/src/main/java/org/apache/impala/catalog/Table.java:191:  public static final 
String TBL_PROP_LAST_COMPUTE_STATS_TIME =
fe/src/main/java/org/apache/impala/catalog/Table.java:195:  public static final 
String TBL_PROP_EXTERNAL_TABLE = "EXTERNAL";
fe/src/main/java/org/apache/impala/catalog/Table.java:198:  public static final 
String TBL_PROP_EXTERNAL_TABLE_PURGE = "external.table.purge";
fe/src/main/java/org/apache/impala/catalog/Table.java:199:  public static final 
String TBL_PROP_EXTERNAL_TABLE_PURGE_DEFAULT = "TRUE";

Going forward, I wish we can have standard prefix for impala-specific table 
property key, either "impala.*" or "__IMPALA_*".
I wonder what is Quanlong and Wenzhe's opinion on this.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Thu, 18 Apr 2024 15:53:40 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-17 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 4:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/15934/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Wed, 17 Apr 2024 20:52:45 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-17 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Riza Suminto, Jason Fehr, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#4).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
D fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
15 files changed, 208 insertions(+), 244 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/4
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-17 Thread Michael Smith (Code Review)
Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 2:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/21302/2/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/2/be/src/service/workload-management.cc@116
PS2, Line 116: field.db_column
> Is this the reason why TQueryTableColumn values all changed to lowercase?
Yes, that's why I changed them. I guess I can do that instead. According to 
https://impala.apache.org/docs/build/html/topics/impala_identifiers.html, IDs 
are case-insensitive and converted to lower-case internally, so I can probably 
let this be uppercase and the only thing affected will be logs.


http://gerrit.cloudera.org:8080/#/c/21302/2/common/thrift/SystemTables.thrift
File common/thrift/SystemTables.thrift:

http://gerrit.cloudera.org:8080/#/c/21302/2/common/thrift/SystemTables.thrift@23
PS2, Line 23: cluster_id = 0
: query_id
> Assign ordinal number for other values?
Just going to go back to unassigned. There's a DCHECK that asserts these are 
sequential starting from 0.


http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
File fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java:

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java@25
PS2, Line 25:  * TableRef class for system tables.
> Comment what can and can not be done with SystemTableRef, such as "COMPUTE
Ack


http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS2, Line 59: public static final String TBL_PROP_SYSTEM_TABLE = 
"__IMPALA_SYSTEM_TABLE";
> Do we have common place to put all table properties that only understood by
I don't think so. I was looking at DataSourceTable for this pattern.



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Wed, 17 Apr 2024 20:16:09 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-17 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS2, Line 59: public static final String TBL_PROP_SYSTEM_TABLE = 
"__IMPALA_SYSTEM_TABLE";
> Do we have common place to put all table properties that only understood by
At least these properties are all defined by Impala:

impala.events.catalogServiceId
impala.events.catalogVersion
impala.lastComputeStatsTime
numRows
totalSize

Some of them are declared in FeTable.java.



-- 
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Wed, 17 Apr 2024 20:15:44 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-17 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 2:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/21302/2/be/src/service/workload-management.cc
File be/src/service/workload-management.cc:

http://gerrit.cloudera.org:8080/#/c/21302/2/be/src/service/workload-management.cc@116
PS2, Line 116: field.db_column
Is this the reason why TQueryTableColumn values all changed to lowercase?
All enum values in common/thrift/ are upper case. Can we keep them uppercase 
and only lowercase them as needed using std::to_string() and std::tolower()?


http://gerrit.cloudera.org:8080/#/c/21302/2/common/thrift/SystemTables.thrift
File common/thrift/SystemTables.thrift:

http://gerrit.cloudera.org:8080/#/c/21302/2/common/thrift/SystemTables.thrift@23
PS2, Line 23: cluster_id = 0
: query_id
Assign ordinal number for other values?


http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
File fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java:

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java@25
PS2, Line 25:  * TableRef class for system tables.
Comment what can and can not be done with SystemTableRef, such as "COMPUTE 
STATS".


http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java
File fe/src/main/java/org/apache/impala/catalog/SystemTable.java:

http://gerrit.cloudera.org:8080/#/c/21302/2/fe/src/main/java/org/apache/impala/catalog/SystemTable.java@59
PS2, Line 59: public static final String TBL_PROP_SYSTEM_TABLE = 
"__IMPALA_SYSTEM_TABLE";
Do we have common place to put all table properties that only understood by 
Impala?



--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Wed, 17 Apr 2024 19:45:44 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-15 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 2:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/15901/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Mon, 15 Apr 2024 23:20:39 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-15 Thread Michael Smith (Code Review)
Hello Andrew Sherman, Riza Suminto, Jason Fehr, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/21302

to look at the new patch set (#2).

Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
D fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
16 files changed, 299 insertions(+), 342 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/2
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-15 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21302 )

Change subject: IMPALA-13005: Create Query Live table in HMS
..


Patch Set 1:

Build Failed

https://jenkins.impala.io/job/gerrit-code-review-checks/15899/ : Initial code 
review checks failed. See linked job for details on the failure.


--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Jason Fehr 
Gerrit-Reviewer: Michael Smith 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Mon, 15 Apr 2024 22:42:39 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13005: Create Query Live table in HMS

2024-04-15 Thread Michael Smith (Code Review)
Michael Smith has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/21302


Change subject: IMPALA-13005: Create Query Live table in HMS
..

IMPALA-13005: Create Query Live table in HMS

Creates the 'sys.impala_query_live' table in HMS using a similar 'CREATE
TABLE' command to 'sys.impala_query_log'. Updates frontend to identify a
System Table based on the '__IMPALA_SYSTEM_TABLE' property. Tables
improperly marked with '__IMPALA_SYSTEM_TABLE' will error when
attempting to scan them because no relevant scanner will be available.

Creating the table in HMS simplifies supporting 'SHOW CREATE TABLE' and
'DESCRIBE EXTENDED', so allows them for parity with Query Log.
Explicitly disables 'COMPUTE STATS' on system tables as it doesn't work
correctly.

Updates workload management implementation to rely more on
SystemTables.thrift definition, and adds DCHECKs to verify completeness
and ordering.

Testing:
- adds additional test cases for changes to introspection commands
- passes existing test_query_live and test_query_log suites

Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/exec/system-table-scanner.cc
M be/src/service/workload-management-fields.cc
M be/src/service/workload-management.cc
M be/src/service/workload-management.h
M common/thrift/SystemTables.thrift
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
M fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/ShowCreateTableStmt.java
A fe/src/main/java/org/apache/impala/analysis/SystemTableRef.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
M fe/src/main/java/org/apache/impala/catalog/SystemTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
D fe/src/test/java/org/apache/impala/catalog/SystemTableTest.java
M tests/custom_cluster/test_query_live.py
16 files changed, 299 insertions(+), 342 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/21302/1
--
To view, visit http://gerrit.cloudera.org:8080/21302
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf302ee54a819fdee2db0ae582a5eeddffe4a5b4
Gerrit-Change-Number: 21302
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith