Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add owner field into show full tables #14219

Merged
merged 2 commits into from Jan 4, 2024

Conversation

guojidan
Copy link
Contributor

@guojidan guojidan commented Jan 3, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR.

Fixes #14152

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Jan 3, 2024
@guojidan guojidan marked this pull request as draft January 3, 2024 10:43
@guojidan
Copy link
Contributor Author

guojidan commented Jan 3, 2024

SHOW FULL TABLES contain create_time field, I do not know how to code sqllogic-test 😕

@guojidan guojidan marked this pull request as ready for review January 3, 2024 11:11
@Dousir9
Copy link
Member

Dousir9 commented Jan 3, 2024

SHOW FULL TABLES contain create_time field, I do not know how to code sqllogic-test 😕

A simple sqllogictest example: tests/sqllogictests/suites/query/select.test

@TCeason TCeason changed the title feat: add owner field into show fill tables feat: add owner field into show full tables Jan 4, 2024
@TCeason
Copy link
Collaborator

TCeason commented Jan 4, 2024

SHOW FULL TABLES contain create_time field, I do not know how to code sqllogic-test 😕

Try to modify this:

diff --git a/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql b/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
index 1e49ac39cd..c0183b8a57 100644
--- a/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
+++ b/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
@@ -3,8 +3,11 @@ CREATE DATABASE db12_0002;
 USE db12_0002;
 
 CREATE TABLE t(c1 int);
+show full tables from db12_0002;
+
 DROP TABLE t;
 
 show tables history like 't';
 
 DROP database db12_0002;
+

then run this command on your local:

$ pwd
datafuse/tests
$ ./databend-test 12_0002_time_travel_show_tables_hist.sql

@TCeason
Copy link
Collaborator

TCeason commented Jan 4, 2024

SHOW FULL TABLES contain create_time field, I do not know how to code sqllogic-test 😕

Try to modify this:

diff --git a/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql b/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
index 1e49ac39cd..c0183b8a57 100644
--- a/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
+++ b/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
@@ -3,8 +3,11 @@ CREATE DATABASE db12_0002;
 USE db12_0002;
 
 CREATE TABLE t(c1 int);
+show full tables from db12_0002;
+
 DROP TABLE t;
 
 show tables history like 't';
 
 DROP database db12_0002;
+

then run this command on your local:

$ pwd
datafuse/tests
$ ./databend-test 12_0002_time_travel_show_tables_hist.sql

On my laptop, the result is:

+t BASE TABLE db12_0002 default FUSE yyyy-mm-dd HH:MM:SS.ssssss 0 0 0 0

So in your local, it should add owner fileds result.

@TCeason
Copy link
Collaborator

TCeason commented Jan 4, 2024

Now let's wait the ci passed. 88aea35

@TCeason TCeason self-requested a review January 4, 2024 02:32
@guojidan
Copy link
Contributor Author

guojidan commented Jan 4, 2024

SHOW FULL TABLES contain create_time field, I do not know how to code sqllogic-test 😕

Try to modify this:

diff --git a/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql b/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
index 1e49ac39cd..c0183b8a57 100644
--- a/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
+++ b/tests/suites/0_stateless/12_time_travel/12_0002_time_travel_show_tables_hist.sql
@@ -3,8 +3,11 @@ CREATE DATABASE db12_0002;
 USE db12_0002;
 
 CREATE TABLE t(c1 int);
+show full tables from db12_0002;
+
 DROP TABLE t;
 
 show tables history like 't';
 
 DROP database db12_0002;
+

then run this command on your local:

$ pwd
datafuse/tests
$ ./databend-test 12_0002_time_travel_show_tables_hist.sql

On my laptop, the result is:

+t BASE TABLE db12_0002 default FUSE yyyy-mm-dd HH:MM:SS.ssssss 0 0 0 0

So in your local, it should add owner fileds result.

Wow, I got it

@BohuTANG BohuTANG merged commit f5598f8 into datafuselabs:main Jan 4, 2024
71 checks passed
@guojidan guojidan deleted the owner-field branch January 4, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: owner field in the SHOW FULL TABLES statement
4 participants