Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ private static void addColumnDiffs(
columnDiff.rightValue().getColumnName(),
columnDiff.rightValue().getColumnTypeString(),
(columnDiff.rightValue().isNotNull() ? "NOT NULL" : null),
columnDiff.rightValue().getGenerationClause(),
columnDiff.rightValue().getColumnDefaultClause()));
} else {
notNullOrTypeChanged = false;
Expand Down
6 changes: 6 additions & 0 deletions src/test/resources/expectedDdlDiff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,5 +397,11 @@ ALTER TABLE test1 ADD COLUMN col3 UUID

ALTER TABLE test1 ADD COLUMN col2 TOKENLIST AS ( TOKENIZE_NGRAMS ( domain, ngram_size_min => 2, ngram_size_max => 12 ) ) HIDDEN

== test 78 widen generated columns

ALTER TABLE test1 ALTER COLUMN stored_gen STRING(256) AS ( lower ( name ) ) STORED
ALTER TABLE test1 ALTER COLUMN virtual_gen STRING(256) AS ( upper ( name ) )
ALTER TABLE test1 ALTER COLUMN regular STRING(256)

==

10 changes: 10 additions & 0 deletions src/test/resources/newDdl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -620,4 +620,14 @@ create table test1 (
col2 TOKENLIST AS (TOKENIZE_NGRAMS(domain, ngram_size_min => 2, ngram_size_max => 12)) HIDDEN,
) primary key (col1);

== test 78 widen generated columns

create table test1 (
col1 int64,
name string(100),
stored_gen string(256) as (lower(name)) stored,
virtual_gen string(256) as (upper(name)),
regular string(256)
) primary key (col1);

==
10 changes: 10 additions & 0 deletions src/test/resources/originalDdl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -617,4 +617,14 @@ create table test1 (
col1 int64
) primary key (col1);

== test 78 widen generated columns

create table test1 (
col1 int64,
name string(100),
stored_gen string(100) as (lower(name)) stored,
virtual_gen string(100) as (upper(name)),
regular string(100)
) primary key (col1);

==