diff --git a/cdc/api/v2/model_test.go b/cdc/api/v2/model_test.go index db0c57fa696..7b6b40ca70d 100644 --- a/cdc/api/v2/model_test.go +++ b/cdc/api/v2/model_test.go @@ -51,7 +51,7 @@ var defaultAPIConfig = &ReplicaConfig{ }, EncoderConcurrency: util.AddressOf(16), Terminator: util.AddressOf(config.CRLF), - DateSeparator: util.AddressOf(config.DateSeparatorNone.String()), + DateSeparator: util.AddressOf(config.DateSeparatorDay.String()), EnablePartitionSeparator: util.AddressOf(true), EnableKafkaSinkV2: util.AddressOf(false), OnlyOutputUpdatedColumns: util.AddressOf(false), diff --git a/pkg/cmd/util/helper_test.go b/pkg/cmd/util/helper_test.go index 8cfbe421036..df5b9aded6c 100644 --- a/pkg/cmd/util/helper_test.go +++ b/pkg/cmd/util/helper_test.go @@ -206,7 +206,7 @@ func TestAndWriteExampleReplicaTOML(t *testing.T) { NullString: config.NULL, }, Terminator: util.AddressOf("\r\n"), - DateSeparator: util.AddressOf(config.DateSeparatorNone.String()), + DateSeparator: util.AddressOf(config.DateSeparatorDay.String()), EnablePartitionSeparator: util.AddressOf(true), EnableKafkaSinkV2: util.AddressOf(false), OnlyOutputUpdatedColumns: util.AddressOf(false), diff --git a/pkg/config/config_test_data.go b/pkg/config/config_test_data.go index e147693cf45..055d34cdb49 100644 --- a/pkg/config/config_test_data.go +++ b/pkg/config/config_test_data.go @@ -37,7 +37,7 @@ const ( "sink": { "encoder-concurrency": 16, "terminator": "\r\n", - "date-separator": "none", + "date-separator": "day", "dispatch-rules": [ { "db-name": "a", diff --git a/pkg/config/replica_config.go b/pkg/config/replica_config.go index 861ca2b7994..4aecd9d0c7a 100644 --- a/pkg/config/replica_config.go +++ b/pkg/config/replica_config.go @@ -61,7 +61,7 @@ var defaultReplicaConfig = &ReplicaConfig{ }, EncoderConcurrency: util.AddressOf(16), Terminator: util.AddressOf(CRLF), - DateSeparator: util.AddressOf(DateSeparatorNone.String()), + DateSeparator: util.AddressOf(DateSeparatorDay.String()), EnablePartitionSeparator: util.AddressOf(true), EnableKafkaSinkV2: util.AddressOf(false), OnlyOutputUpdatedColumns: util.AddressOf(false), diff --git a/pkg/sink/cloudstorage/config_test.go b/pkg/sink/cloudstorage/config_test.go index f2faefbc3f0..e6a5d3966f1 100644 --- a/pkg/sink/cloudstorage/config_test.go +++ b/pkg/sink/cloudstorage/config_test.go @@ -21,7 +21,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/pingcap/tiflow/pkg/config" - "github.com/pingcap/tiflow/pkg/util" "github.com/stretchr/testify/require" ) @@ -31,14 +30,13 @@ func TestConfigApply(t *testing.T) { expected.FlushInterval = 10 * time.Second expected.FileSize = 16 * 1024 * 1024 expected.FileIndexWidth = config.DefaultFileIndexWidth - expected.DateSeparator = config.DateSeparatorNone.String() + expected.DateSeparator = config.DateSeparatorDay.String() expected.EnablePartitionSeparator = true uri := "s3://bucket/prefix?worker-count=32&flush-interval=10s&file-size=16777216&protocol=csv" sinkURI, err := url.Parse(uri) require.Nil(t, err) replicaConfig := config.GetDefaultReplicaConfig() - replicaConfig.Sink.DateSeparator = util.AddressOf(config.DateSeparatorNone.String()) err = replicaConfig.ValidateAndAdjust(sinkURI) require.NoError(t, err) cfg := NewConfig()