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

information_schema.partitions view is empty when partitioned table is present #48463

Closed
j-bennet opened this issue Jul 16, 2024 · 1 comment
Closed
Assignees
Labels
type/bug Something isn't working

Comments

@j-bennet
Copy link

j-bennet commented Jul 16, 2024

information_schema.partitions view is supposed to contain information on table partitions:

https://docs.starrocks.io/docs/reference/information_schema/partitions/

However, it's empty when a partitioned table is created (see steps).

Steps to reproduce the behavior (Required)

SQL taken from the documentation here:

https://docs.starrocks.io/docs/3.0/table_design/Data_distribution/#partitioning-methods

CREATE TABLE site_access (
    event_day DATETIME NOT NULL,
    site_id INT DEFAULT '10',
    city_code VARCHAR(100),
    user_name VARCHAR(32) DEFAULT '',
    pv BIGINT DEFAULT '0'
)
DUPLICATE KEY(event_day, site_id, city_code, user_name)
PARTITION BY date_trunc('day', event_day)
DISTRIBUTED BY HASH(event_day, site_id);

INSERT INTO site_access VALUES 
("2023-02-26 20:12:04",002,"New York","Sam Smith",1),
("2023-02-27 21:06:54",001,"Los Angeles","Taylor Swift",1);

select * from information_schema.partitions;

Expected behavior (Required)

There should be two partitions listed.

Real behavior (Required)

Empty result is returned from SELECT.

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
  • 3.3.0-19a3f66
@j-bennet j-bennet added the type/bug Something isn't working label Jul 16, 2024
@starrocks-xupeng
Copy link
Contributor

if you want to check partition info, you should use information_schema.partitions_meta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants