Skip to content

Conversation

@Loaki07
Copy link
Contributor

@Loaki07 Loaki07 commented Dec 8, 2025

No description provided.

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Dec 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 8, 2025

Greptile Overview

Greptile Summary

Enhanced auto-UDS (User-Defined Schema) to include user-configured full-text search and index fields in the keep_fields set. Previously, only default SQL FTS fields were preserved when auto-UDS was triggered; now user-configured full_text_search_keys and index_fields from stream settings are also included to ensure they remain in the schema.

  • Added iteration over stream_setting.full_text_search_keys to preserve user-configured FTS fields
  • Added iteration over stream_setting.index_fields to preserve user-configured index fields
  • Improved comment clarity for default SQL FTS fields

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a targeted bug fix that adds missing logic to preserve user-configured fields during auto-UDS activation. The implementation follows the existing pattern (iterating over fields and inserting into HashSet), is consistent with how default SQL FTS fields are handled, and improves comment clarity. No logic errors or edge cases detected.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/service/schema.rs 5/5 Added user-configured FTS and index fields to auto-UDS keep_fields to ensure they are included when UDS is automatically enabled

Sequence Diagram

sequenceDiagram
    participant Client as Ingestion Client
    participant Schema as handle_diff_schema
    participant StreamSettings as Stream Settings
    participant UDS as Auto UDS Logic
    participant DB as Database

    Client->>Schema: Ingest data with new fields
    Schema->>Schema: Check if auto UDS should enable
    Schema->>StreamSettings: Get stream settings
    StreamSettings-->>Schema: Return settings (FTS keys, index fields)
    
    Schema->>UDS: Build keep_fields set
    UDS->>UDS: Add default fields (timestamp, id, etc.)
    UDS->>UDS: Add SQL FTS default fields
    UDS->>UDS: Add user-configured FTS fields (NEW)
    UDS->>UDS: Add user-configured index fields (NEW)
    UDS->>UDS: Add fields from existing schema
    UDS->>UDS: Add remaining fields until max limit
    
    UDS-->>Schema: Return defined_schema_fields
    Schema->>DB: Save updated stream settings
    Schema->>Client: Schema updated successfully
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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

Labels

☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants