Skip to content

Commit

Permalink
DAT-19349: added missing supported snapshot data to the harness Chang…
Browse files Browse the repository at this point in the history
…eObjectTests related files, update some expected snapshots. Updated some descriptions, enabled different default value tests.
  • Loading branch information
Mykhailo Savchenko committed Jan 8, 2025
1 parent aa41d18 commit 04ed4dd
Show file tree
Hide file tree
Showing 20 changed files with 157 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{

"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "posts",
"tblProperties": ".*'delta.constraints.test_check_constraint'='id > 0'.*"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "posts"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"name": "title",
"type": {
"typeName": "VARCHAR"
},
"defaultValue": "title_test"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"name": "booleanColumn",
"type": {
"typeName": "BOOLEAN"
},
"defaultValue": "TRUE"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"name": "inserted_date",
"type": {
"typeName": "DATE"
},
"defaultValue": "CURRENT_TIMESTAMP",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"name": "dateTimeColumn",
"type": {
"typeName": "TIMESTAMP"
},
"defaultValue": "'2008-02-12 12:34:03'",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "test_table_alter_cluster",
"clusteringColumns": "test_id,test_new"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{

"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "test_alter_table_properties",
"tblProperties": ".*'external.location'='s3://mybucket/mytable', 'this.is.my.key'='12', 'this.is.my.key2'='true'.*"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{

"snapshot": {
"objects": {
"liquibase.structure.core.View": [
{
"view": {
"name": "test_alter_view_properties",
"tblProperties": ".*'external.location'='s3://mybucket/mytable', 'this.is.my.key'='12', 'this.is.my.key2'='true'.*"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"liquibase.structure.core.Table": [
{
"table": {
"name": "test_table_clustered"
"name": "test_table_clustered",
"clusteringColumns": "test_id"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"liquibase.structure.core.Table": [
{
"table": {
"name": "test_table_partitioned"
"name": "test_table_partitioned",
"partitionColumns": "partition_column"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{

"snapshot": {
"objects": {
"_noMatch": true,
"_noMatchField": "tblProperties",
"liquibase.structure.core.Table": [
{
"table": {
"name": "posts",
"tblProperties": ".*'delta.constraints.test_check_constraint'='id > 0'.*"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
INVALID TEST
-- Databricks supports default values, but does not support them in snapshot data json
--ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT 'title_test'
ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT 'title_test'
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
INVALID TEST
-- Databricks supports default values, but the object does not exist in the metadata
-- --ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT false
ALTER TABLE main.liquibase_harness_test_ds.authors ADD COLUMN booleanColumn BOOLEAN
ALTER TABLE main.liquibase_harness_test_ds.authors ALTER COLUMN booleanColumn SET DEFAULT TRUE
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
INVALID TEST
-- Databricks supports default values and generated columns, but the object does not exist in the metadata returned in jdbc
ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN inserted_date SET DEFAULT CURRENT_TIMESTAMP
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
INVALID TEST
-- Databricks supports default values, but the object does not exist in the metadata
--ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT false
ALTER TABLE main.liquibase_harness_test_ds.authors ADD COLUMN dateTimeColumn TIMESTAMP
ALTER TABLE main.liquibase_harness_test_ds.authors ALTER COLUMN dateTimeColumn SET DEFAULT '2008-02-12 12:34:03'
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
INVALID TEST
-- Databricks supports default values, but the object does not exist in the metadata
--ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT false
-- Databricks does not support NUMBER type
-- ALTER TABLE main.liquibase_harness_test_ds.authors ADD COLUMN numericColumn NUMBER
-- ALTER TABLE main.liquibase_harness_test_ds.authors ALTER COLUMN numericColumn SET DEFAULT 100000000
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
INVALID TEST
INVALID TEST
--Database databricks does not support sequences
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
INVALID TEST
-- Databricks supports functions, but this can only be done in liquibase PRO
-- Databricks supports functions, but this can only be done in Databricks commercial extension
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
INVALID TEST
Databricks does not support the concept of triggers
--Databricks does not support the concept of triggers
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
INVALID TEST
Databricks does not support the concept of triggers
--Databricks does not support the concept of triggers

0 comments on commit 04ed4dd

Please sign in to comment.