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

Support for using TEXT fields in secondary indexes and UNIQUE constraints #829

Merged
merged 18 commits into from
Oct 16, 2024

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Oct 9, 2024

Allows TEXT columns in Doltgres to work when used in secondary indexes and in unique constraints. PostgreSQL does not have a concept of prefix lengths and Dolt requires prefix lengths for TEXT columns. This now works in Doltgres because a new Doltgres analyzer rule implicitly fills in a default prefix length in these cases.

Depends on:

@dolthub dolthub deleted a comment from github-actions bot Oct 15, 2024
@dolthub dolthub deleted a comment from github-actions bot Oct 15, 2024
….Type() returning sqltype.TEXT (since many other extended types return sqltypes.TEXT)
@dolthub dolthub deleted a comment from github-actions bot Oct 16, 2024
Copy link
Contributor

Main PR
Total 42090 42090
Successful 12728 12743
Failures 29362 29347
Partial Successes1 4897 4897
Main PR
Successful 30.2400% 30.2756%
Failures 69.7600% 69.7244%

${\color{lightgreen}Progressions}$

alter_table

QUERY: create index test_storage_idx on test_storage (b, a);

collate.icu.utf8

QUERY: CREATE INDEX collate_test1_idx1 ON collate_test1 (b);

compression

QUERY: CREATE INDEX idx ON cmdata(f1);

create_index

QUERY: CREATE INDEX std_index on concur_heap(f2);
QUERY: CREATE INDEX concur_reindex_ind2 ON concur_reindex_tab(c2);
QUERY: CREATE INDEX ON table2(col2);

fast_default

QUERY: CREATE INDEX i ON T(c_int, c_text);

indexing

QUERY: create index on idxpart2 (c, b);

memoize

QUERY: CREATE INDEX strtest_t_idx ON strtest (t);

psql

QUERY: create index on gexec_test(b)

replica_identity

QUERY: CREATE INDEX test_replica_identity_keyab ON test_replica_identity (keya, keyb);

rowtypes

QUERY: create index on test_table (a,b);

triggers

QUERY: create index fkeys_i on fkeys (fkey1, fkey2);
QUERY: create index fkeys2_i on fkeys2 (fkey21, fkey22);

vacuum

QUERY: CREATE INDEX no_index_cleanup_idx ON no_index_cleanup(t);

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

server/analyzer/add_implicit_prefix_lengths.go Outdated Show resolved Hide resolved
server/analyzer/add_implicit_prefix_lengths.go Outdated Show resolved Hide resolved
testing/go/types_test.go Outdated Show resolved Hide resolved
testing/go/types_test.go Outdated Show resolved Hide resolved
@fulghum fulghum merged commit 011b5b2 into main Oct 16, 2024
13 checks passed
@fulghum fulghum deleted the fulghum/text branch October 16, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants