-
Notifications
You must be signed in to change notification settings - Fork 3.8k
CASSANDRA-19637(trunk): Makes conditions behavior on frozen and non-frozen columns consistent for null column values #3362
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3315,13 +3315,16 @@ public static ColumnFamilyStore getIfExists(TableId id) | |
| if (metadata == null) | ||
| return null; | ||
|
|
||
| Keyspace keyspace = Keyspace.open(metadata.keyspace); | ||
| if (keyspace == null) | ||
| return null; | ||
| return getIfExists(metadata); | ||
| } | ||
|
|
||
| return keyspace.hasColumnFamilyStore(id) | ||
| ? keyspace.getColumnFamilyStore(id) | ||
| : null; | ||
| /** | ||
| * Returns a ColumnFamilyStore by metadata if it exists, null otherwise | ||
| * Differently from others, this method does not throw exception if the table does not exist. | ||
| */ | ||
| public static ColumnFamilyStore getIfExists(TableMetadata table) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add |
||
| { | ||
| return Keyspace.openAndGetStoreIfExists(table); | ||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,6 +160,14 @@ public static ColumnFamilyStore openAndGetStore(TableMetadata table) | |
| return open(table.keyspace).getColumnFamilyStore(table.id); | ||
| } | ||
|
|
||
| public static ColumnFamilyStore openAndGetStoreIfExists(TableMetadata table) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add |
||
| { | ||
| Keyspace keyspace = open(table.keyspace); | ||
| if (keyspace == null) | ||
| return null; | ||
| return keyspace.getIfExists(table.id); | ||
| } | ||
|
|
||
| /** | ||
| * Removes every SSTable in the directory from the appropriate Tracker's view. | ||
| * @param directory the unreadable directory, possibly with SSTables in it, but not necessarily. | ||
|
|
@@ -202,6 +210,11 @@ public ColumnFamilyStore getColumnFamilyStore(TableId id) | |
| return cfs; | ||
| } | ||
|
|
||
| public ColumnFamilyStore getIfExists(TableId id) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add |
||
| { | ||
| return columnFamilyStores.get(id); | ||
| } | ||
|
|
||
| public boolean hasColumnFamilyStore(TableId id) | ||
| { | ||
| return columnFamilyStores.containsKey(id); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge conflict