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 — BigQuerySource.get_table_query_string() silently ignores query when table is also set · Issue #6200 · feast-dev/feast

BigQuerySource.get_table_query_string() silently ignores query when table is also set #6200

New issue
Copy link
New issue
Copy link
Closed
#6360
Closed
BigQuerySource.get_table_query_string() silently ignores query when table is also set#6200
#6360
Copy link

Description

@max36067
max36067
opened on Mar 31, 2026
Issue body actions

Summary

When both table and query are provided to BigQuerySource, get_table_query_string() always returns table, silently ignoring query. This makes it impossible to use a custom query (e.g., for deduplication) on a PushSource batch source, since PushSource requires table for offline writes via offline_write_batch().

Expected Behavior

When both table and query are set on a BigQuerySource:

  • Reads (get_table_query_string()) should use query — it's more specific and intentionally provided
  • Writes (offline_write_batch()) should continue using .table directly as the write destination

Current Behavior

get_table_query_string() in bigquery_source.py always prefers table:

def get_table_query_string(self) -> str:
    if self.table:
        return f"`{self.table}`"
    return f"({self.query})"

This means any custom query (e.g., deduplication logic) is silently ignored when table is also present.

Use Case

Streaming (push) sources often produce duplicate rows in BigQuery. The natural solution is:

batch_source = BigQuerySource(
    name="my_batch_source",
    table="project.dataset.my_table",        # needed for push writes
    query="""
        SELECT * FROM `project.dataset.my_table`
        QUALIFY ROW_NUMBER() OVER (PARTITION BY entity_id, event_time) = 1
    """,                                      # needed for deduplicated reads
    timestamp_field="event_time",
)
push_source = PushSource(name="my_source", batch_source=batch_source)

But because get_table_query_string() ignores query when table is set, reads return duplicates. And removing table to force query usage breaks offline_write_batch(), which accesses .table directly (bigquery.py:449).

Environment

  • Feast version: 0.58.0 (also confirmed unresolved on 0.61.0 / current main)
  • Offline store: BigQuery

Activity

  1. Jwrede
    added 2 commits that reference this issue on May 3, 2026

    fix(bigquery): prefer query over table in get_table_query_string

    This issue will close once commit af72355 is merged into the 'master' branch.
    af72355

    fix(bigquery): prefer query over table in get_table_query_string

    This issue will close once commit cb5b03b is merged into the 'master' branch.
    cb5b03b
  2. ntkathole
    added a commit that references this issue on May 3, 2026

    fix(bigquery): Prefer query over table in get_table_query_string (#6360)

    This issue will close once commit 77ed779 is merged into the 'master' branch.
    77ed779
  3. ntkathole
    closed this as completedin #6360on May 3, 2026
  4. franciscojavierarceo
    added a commit that references this issue on May 4, 2026

    chore(release): release 0.63.0

    50ad181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — 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.