Skip to content

Conversation

@Kubuxu
Copy link
Contributor

@Kubuxu Kubuxu commented Jul 11, 2025

We need to swap them becasue the wildcard seems to be avaluated at the
view creation time.

We need to swap them becasue the wildcard seems to be avaluated at the
view creation time.

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Copilot AI review requested due to automatic review settings July 11, 2025 17:00
@github-project-automation github-project-automation bot moved this to Todo in F3 Jul 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the view creation logic to ensure wildcard-based parquet file selections are re-applied each time by using OR REPLACE instead of IF NOT EXISTS.

  • Switches CREATE VIEW IF NOT EXISTS to CREATE OR REPLACE VIEW in createOrReplaceMessagesView.
  • Retains the existing parquet union logic.
Comments suppressed due to low confidence (2)

observer/observer.go:218

  • [nitpick] Consider adding a comment above this line explaining why OR REPLACE is required to ensure that updates to the wildcard file pattern are applied correctly when the view is recreated.
	createView := fmt.Sprintf(`CREATE OR REPLACE VIEW messages AS SELECT * FROM latest_messages %s`, includeParquetFiles)

observer/observer.go:215

  • Add unit tests for createOrReplaceMessagesView covering both includeParquet=true and includeParquet=false to verify the correct SQL is generated and executed under each scenario.
	if includeParquet {

@Kubuxu Kubuxu merged commit e7f84e7 into main Jul 11, 2025
12 of 13 checks passed
@Kubuxu Kubuxu deleted the fix/observer-message-union branch July 11, 2025 17:02
@github-project-automation github-project-automation bot moved this from Todo to Done in F3 Jul 11, 2025
@codecov
Copy link

codecov bot commented Jul 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 65.22%. Comparing base (e384565) to head (112d435).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
observer/observer.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1039      +/-   ##
==========================================
+ Coverage   65.14%   65.22%   +0.08%     
==========================================
  Files          80       80              
  Lines        9702     9702              
==========================================
+ Hits         6320     6328       +8     
+ Misses       2880     2874       -6     
+ Partials      502      500       -2     
Files with missing lines Coverage Δ
observer/observer.go 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants