Skip to content

Commit b915691

Browse files
1 parent 61a3d43 commit b915691

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

‎google/cloud/bigtable_v2/services/bigtable/async_client.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def read_rows(
344344
if regex_match and regex_match.group("table_name"):
345345
header_params["table_name"] = regex_match.group("table_name")
346346

347-
if request.app_profile_id:
347+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
348348
header_params["app_profile_id"] = request.app_profile_id
349349

350350
routing_param_regex = re.compile(
@@ -463,7 +463,7 @@ def sample_row_keys(
463463
if regex_match and regex_match.group("table_name"):
464464
header_params["table_name"] = regex_match.group("table_name")
465465

466-
if request.app_profile_id:
466+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
467467
header_params["app_profile_id"] = request.app_profile_id
468468

469469
routing_param_regex = re.compile(
@@ -603,7 +603,7 @@ async def mutate_row(
603603
if regex_match and regex_match.group("table_name"):
604604
header_params["table_name"] = regex_match.group("table_name")
605605

606-
if request.app_profile_id:
606+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
607607
header_params["app_profile_id"] = request.app_profile_id
608608

609609
routing_param_regex = re.compile(
@@ -737,7 +737,7 @@ def mutate_rows(
737737
if regex_match and regex_match.group("table_name"):
738738
header_params["table_name"] = regex_match.group("table_name")
739739

740-
if request.app_profile_id:
740+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
741741
header_params["app_profile_id"] = request.app_profile_id
742742

743743
routing_param_regex = re.compile(
@@ -914,7 +914,7 @@ async def check_and_mutate_row(
914914
if regex_match and regex_match.group("table_name"):
915915
header_params["table_name"] = regex_match.group("table_name")
916916

917-
if request.app_profile_id:
917+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
918918
header_params["app_profile_id"] = request.app_profile_id
919919

920920
routing_param_regex = re.compile(
@@ -1028,7 +1028,7 @@ async def ping_and_warm(
10281028
if regex_match and regex_match.group("name"):
10291029
header_params["name"] = regex_match.group("name")
10301030

1031-
if request.app_profile_id:
1031+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
10321032
header_params["app_profile_id"] = request.app_profile_id
10331033

10341034
if header_params:
@@ -1165,7 +1165,7 @@ async def read_modify_write_row(
11651165
if regex_match and regex_match.group("table_name"):
11661166
header_params["table_name"] = regex_match.group("table_name")
11671167

1168-
if request.app_profile_id:
1168+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
11691169
header_params["app_profile_id"] = request.app_profile_id
11701170

11711171
routing_param_regex = re.compile(

‎google/cloud/bigtable_v2/services/bigtable/client.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ def read_rows(
768768
if regex_match and regex_match.group("table_name"):
769769
header_params["table_name"] = regex_match.group("table_name")
770770

771-
if request.app_profile_id:
771+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
772772
header_params["app_profile_id"] = request.app_profile_id
773773

774774
routing_param_regex = re.compile(
@@ -884,7 +884,7 @@ def sample_row_keys(
884884
if regex_match and regex_match.group("table_name"):
885885
header_params["table_name"] = regex_match.group("table_name")
886886

887-
if request.app_profile_id:
887+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
888888
header_params["app_profile_id"] = request.app_profile_id
889889

890890
routing_param_regex = re.compile(
@@ -1021,7 +1021,7 @@ def mutate_row(
10211021
if regex_match and regex_match.group("table_name"):
10221022
header_params["table_name"] = regex_match.group("table_name")
10231023

1024-
if request.app_profile_id:
1024+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
10251025
header_params["app_profile_id"] = request.app_profile_id
10261026

10271027
routing_param_regex = re.compile(
@@ -1152,7 +1152,7 @@ def mutate_rows(
11521152
if regex_match and regex_match.group("table_name"):
11531153
header_params["table_name"] = regex_match.group("table_name")
11541154

1155-
if request.app_profile_id:
1155+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
11561156
header_params["app_profile_id"] = request.app_profile_id
11571157

11581158
routing_param_regex = re.compile(
@@ -1326,7 +1326,7 @@ def check_and_mutate_row(
13261326
if regex_match and regex_match.group("table_name"):
13271327
header_params["table_name"] = regex_match.group("table_name")
13281328

1329-
if request.app_profile_id:
1329+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
13301330
header_params["app_profile_id"] = request.app_profile_id
13311331

13321332
routing_param_regex = re.compile(
@@ -1437,7 +1437,7 @@ def ping_and_warm(
14371437
if regex_match and regex_match.group("name"):
14381438
header_params["name"] = regex_match.group("name")
14391439

1440-
if request.app_profile_id:
1440+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
14411441
header_params["app_profile_id"] = request.app_profile_id
14421442

14431443
if header_params:
@@ -1571,7 +1571,7 @@ def read_modify_write_row(
15711571
if regex_match and regex_match.group("table_name"):
15721572
header_params["table_name"] = regex_match.group("table_name")
15731573

1574-
if request.app_profile_id:
1574+
if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing
15751575
header_params["app_profile_id"] = request.app_profile_id
15761576

15771577
routing_param_regex = re.compile(

0 commit comments

Comments
 (0)