[ 
https://issues.apache.org/jira/browse/CASSANDRA-17181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-17181:
---------------------------------------
    Description: 
{{SchemaCQLHelperTest}} is used during a snapshot to generate the 
{{schema.cql}} file. The methods accept the following paramaters: 
{{includeDroppedColumns}}, {{internals}} and {{ifNotExists}}.
Those parameters are in practice always set to true by the calling code and 
therefore can be removed.

  was:
When a schema.cql is created during a snapshot, {{CREATE TYPE}} statements are 
not created with {{IF NOT EXISTS}} as the {{CREATE TABLE}} statements. This can 
cause some issues when using those statements during restore.

Additional Information for newcomers:

In 3.0 and 3.11 the code use to generate the {{schema.cql}} file is in 
{{TableCQLHelper}} and the unit tests in {{TableCQLHelperTest}}.
In 4.0 the bug does not exist anymore but the test {{SchemaCQLHelperTest}} does 
not test the correct behavior  and the code could be simplified


> SchemaCQLHelperTest methods can be simplified
> ---------------------------------------------
>
>                 Key: CASSANDRA-17181
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17181
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Snapshots
>            Reporter: Benjamin Lerer
>            Assignee: Bartlomiej
>            Priority: Normal
>              Labels: AdventCalendar2021, lhf
>             Fix For: 4.1
>
>
> {{SchemaCQLHelperTest}} is used during a snapshot to generate the 
> {{schema.cql}} file. The methods accept the following paramaters: 
> {{includeDroppedColumns}}, {{internals}} and {{ifNotExists}}.
> Those parameters are in practice always set to true by the calling code and 
> therefore can be removed.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to