Skip to content

feat: add AlloyDB time-series forecasting methods to AlloyDBEngine - #630

Open
madamsetty-pavan wants to merge 6 commits into
googleapis:mainfrom
madamsetty-pavan:feat/engine-ai-forecast
Open

feat: add AlloyDB time-series forecasting methods to AlloyDBEngine#630
madamsetty-pavan wants to merge 6 commits into
googleapis:mainfrom
madamsetty-pavan:feat/engine-ai-forecast

Conversation

@madamsetty-pavan

@madamsetty-pavan madamsetty-pavan commented Aug 12, 2026

Copy link
Copy Markdown

feat: add AlloyDB time-series forecasting methods to AlloyDBEngine

  • Add aforecast and forecast methods on AlloyDBEngine
  • Add parameter validation for forecasting inputs
  • Add dynamic SQL builder for google_ml.forecast
  • Add unit tests covering validation errors and SQL generation

- Add aforecast and forecast methods on AlloyDBEngine
- Add parameter validation for forecasting inputs
- Add dynamic SQL builder for google_ml.forecast
- Add unit tests covering validation errors and SQL generation
@product-auto-label product-auto-label Bot added the api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. label Aug 12, 2026
@madamsetty-pavan
madamsetty-pavan marked this pull request as ready for review August 26, 2026 23:45
@madamsetty-pavan
madamsetty-pavan requested review from a team as code owners August 26, 2026 23:45
@twishabansal twishabansal added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Aug 27, 2026
if not model_id or not isinstance(model_id, str) or not model_id.strip():
raise ValueError("model_id must be a non-empty string.")
if (
not source_table

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I read, source_table and source_query are mutually exclusive. Here if source_table is empty an error is thrown. Is this intentional?

):
raise RuntimeError(
"AlloyDB AI google_ml extension is not installed or enabled. "
"Please execute 'CREATE EXTENSION IF NOT EXISTS google_ml CASCADE;' on your database."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be google_ml_integration

@zhou0ricky zhou0ricky left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments, looks good otherwise.

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

Labels

api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants