Elffuss BraidHub

kikocis/java-driver public

Ninja-fix bug when refreshing materialized views during a partial TABLE refresh.

When refreshing only a table or only a materialized view, the CQL query generated would be invalid with a WHERE clause containing "view_name = 'null'".
Changeset2521b15bf39d230065f598f767522985e0fc080143ac7771402cb07b3a5a8fdc
AuthorAlexandre Dutra <alexandre.dutra@datastax.com> · 2015-09-18 15:54 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2015-09-18 19:20 +02:00
Parentsfe97cb078d4e

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java +1 −1
@@ -609,7 +609,7 @@
609609 cfFuture = queryAsync(SELECT_TABLES + whereClause(targetType, targetKeyspace, targetName, targetSignature), connection, protocolVersion);
610610 colsFuture = queryAsync(SELECT_COLUMNS + whereClause(targetType, targetKeyspace, targetName, targetSignature), connection, protocolVersion);
611611 indexesFuture = queryAsync(SELECT_INDEXES + whereClause(targetType, targetKeyspace, targetName, targetSignature), connection, protocolVersion);
612- viewsFuture = queryAsync(SELECT_VIEWS + whereClause(targetType == null ? null : VIEW, targetKeyspace, targetName, targetSignature), connection, protocolVersion);
612+ viewsFuture = queryAsync(SELECT_VIEWS + whereClause(targetType == TABLE ? VIEW : targetType, targetKeyspace, targetName, targetSignature), connection, protocolVersion);
613613 }
614614
615615 if (isSchemaOrKeyspace || targetType == FUNCTION)