Skip to content

chore: using jobs.query rather than READ API for single page - #1539

Open
sachinpro wants to merge 2 commits into
mainfrom
skipping_htapi_for_smaller_queries
Open

chore: using jobs.query rather than READ API for single page#1539
sachinpro wants to merge 2 commits into
mainfrom
skipping_htapi_for_smaller_queries

Conversation

@sachinpro

@sachinpro sachinpro commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Use jobs.query results directly for single-page queries: Returns results from PostQueryWithoutResults directly when a query completes within a single page, avoiding unnecessary Read API (HTAPI) overhead of inserting a job and reading from the destination_table.
  • Fix DATETIME coercion formatting: Standardizes DATETIME string coercion in FormatDatetimeToString to use space-separated format (YYYY-MM-DD HH:MM:SS[.ffffff]) per ODBC standard, ensuring parity between REST and HTAPI flows.
  • Arrow schema type mapping: Updated GetArrowSchema to correctly map arrow::Type::TIMESTAMP to BQDataType::kDatetime (empty timezone) vs. BQDataType::kTimeStamp (UTC).
  • Test updates: Modified expected values in statement_test.cc, data_translation_test.cc and odbc_internal_commons_test.cc.

Testing

  • StatementHtapiTest.SQLExecDirect_htapi_basictypes_success (Passes)
  • DataTranslationTest.From_SQL_DateTime_to_all (Passes)

GHA checks are passing.

@sachinpro
sachinpro force-pushed the skipping_htapi_for_smaller_queries branch from 0be4a1d to bfcdb00 Compare August 25, 2026 11:21
@sachinpro
sachinpro force-pushed the skipping_htapi_for_smaller_queries branch from bfcdb00 to 7283cf3 Compare August 26, 2026 13:18
@sachinpro
sachinpro force-pushed the skipping_htapi_for_smaller_queries branch from 2927f3d to 48ed911 Compare August 26, 2026 13:57
@sachinpro
sachinpro marked this pull request as ready for review August 26, 2026 14:04
@sachinpro
sachinpro requested a review from a team as a code owner August 26, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants