This repository was archived by the owner on Aug 30, 2026. It is now read-only.
File tree
Expand file treeCollapse file tree
Open diff view settings
google-cloud-bigtable/src main/java/com/google/cloud/bigtable/data/v2/models test/java/com/google/cloud/bigtable/data/v2/models
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
43 | 43 | public final class Query implements Serializable { |
44 | 44 | private static final long serialVersionUID = -316972783499434755L; |
45 | 45 |
|
46 | | - // bigtable can server the largest filter size of 20MB. |
47 | | - private static final int MAX_FILTER_SIZE = 20 * 1024 * 1024; |
| 46 | + // bigtable can server the largest filter size of 20KB. |
| 47 | + private static final int MAX_FILTER_SIZE = 20 * 1024; |
48 | 48 |
|
49 | 49 | private final String tableId; |
50 | 50 | private transient ReadRowsRequest.Builder builder = ReadRowsRequest.newBuilder(); |
@@ -170,7 +170,7 @@ public Query filter(Filters.Filter filter) { |
170 | 170 |
|
171 | 171 | RowFilter rowFilter = filter.toProto(); |
172 | 172 | Preconditions.checkArgument( |
173 | | - rowFilter.getSerializedSize() < MAX_FILTER_SIZE, "filter size can't be more than 20MB"); |
| 173 | + rowFilter.getSerializedSize() < MAX_FILTER_SIZE, "filter size can't be more than 20KB"); |
174 | 174 |
|
175 | 175 | builder.setFilter(rowFilter); |
176 | 176 | return this; |
|
Collapse file
Copy file name to clipboardExpand all lines: google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -123,15 +123,15 @@ public void filterTestWithExceptions() { |
123 | 123 | assertThat(actualException).isInstanceOf(NullPointerException.class); |
124 | 124 |
|
125 | 125 | actualException = null; |
126 | | - int maxFilterSize = 20 * 1024 * 1024; |
| 126 | + int maxFilterSize = 20 * 1024; |
127 | 127 | ByteString largeValue = ByteString.copyFrom(new byte[maxFilterSize + 1]); |
128 | 128 |
|
129 | 129 | try { |
130 | 130 | Query.create(TABLE_ID).filter(FILTERS.value().exactMatch(largeValue)); |
131 | 131 | } catch (Exception ex) { |
132 | 132 | actualException = ex; |
133 | 133 | } |
134 | | - assertThat(actualException).hasMessageThat().contains("filter size can't be more than 20MB"); |
| 134 | + assertThat(actualException).hasMessageThat().contains("filter size can't be more than 20KB"); |
135 | 135 | } |
136 | 136 |
|
137 | 137 | @Test |
|