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(query): show create table support display inverted index #15169

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

b41sh
Copy link
Member

@b41sh b41sh commented Apr 4, 2024

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

Summary

  • Show create table support display inverted index.
  • Add DuplicatedIndexColumnId error code to check column id duplicate in different inverted indexes.
  • Add IndexColumnIdNotFound error code to check invalid column id.

for example:

mysql> CREATE TABLE t (id int, content string);
Query OK, 0 rows affected (0.49 sec)

mysql> CREATE INVERTED INDEX IF NOT EXISTS idx1 ON t(content) tokenizer = 'chinese';
Query OK, 0 rows affected (0.16 sec)

mysql> SHOW CREATE TABLE t;
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                     |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE t (
  id INT NULL,
  content VARCHAR NULL,
  SYNC INVERTED INDEX idx1 (content) tokenizer = 'chinese'
) ENGINE=FUSE |
+-------+----------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.37 sec)
Read 0 rows, 0.00 B in 0.155 sec., 0 rows/sec., 0.00 B/sec.

part of #14825

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):

@b41sh b41sh requested a review from sundy-li April 4, 2024 15:23
@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Apr 4, 2024
@BohuTANG
Copy link
Member

BohuTANG commented Apr 5, 2024

Not sure why this is failed:
image

@b41sh b41sh force-pushed the feat-inverted-index-7 branch from 1ed2446 to 963505e Compare April 5, 2024 11:47
@BohuTANG BohuTANG merged commit efadb34 into databendlabs:main Apr 5, 2024
72 checks passed
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.

3 participants