GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: filter limit constant (#787) (#835) · googleapis/java-bigtable@cf16cfe

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
Filter options
  • google-cloud-bigtable/src
    • main/java/com/google/cloud/bigtable/data/v2/models
      • Query.java
    • test/java/com/google/cloud/bigtable/data/v2/models
      • QueryTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java‎

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 numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
public final class Query implements Serializable {
4444
private static final long serialVersionUID = -316972783499434755L;
4545

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;
4848

4949
private final String tableId;
5050
private transient ReadRowsRequest.Builder builder = ReadRowsRequest.newBuilder();
@@ -170,7 +170,7 @@ public Query filter(Filters.Filter filter) {
170170

171171
RowFilter rowFilter = filter.toProto();
172172
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");
174174

175175
builder.setFilter(rowFilter);
176176
return this;
Collapse file

‎google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java‎

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 numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ public void filterTestWithExceptions() {
123123
assertThat(actualException).isInstanceOf(NullPointerException.class);
124124

125125
actualException = null;
126-
int maxFilterSize = 20 * 1024 * 1024;
126+
int maxFilterSize = 20 * 1024;
127127
ByteString largeValue = ByteString.copyFrom(new byte[maxFilterSize + 1]);
128128

129129
try {
130130
Query.create(TABLE_ID).filter(FILTERS.value().exactMatch(largeValue));
131131
} catch (Exception ex) {
132132
actualException = ex;
133133
}
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");
135135
}
136136

137137
@Test

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.