Skip to content

Conversation

@mbrotos
Copy link
Owner

@mbrotos mbrotos commented Jun 14, 2025

No description provided.

@mbrotos mbrotos requested review from DrRakha and Copilot June 14, 2025 17:59
@mbrotos mbrotos self-assigned this Jun 14, 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 data-loading function’s default behavior and adds a new end-to-end test script for the analysis functions.

  • Changed load_parquet() to use filter_tail_ns = -1 and dropped the hardcoded "warehouse" filter.
  • Added analysis/acc_cum_test.R with a synthetic dataset and sanity checks for is_correct(), cumulative accuracy, and performance functions.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
analysis/common_functions.R Updated load_parquet() signature and removed the warehouse filter
analysis/acc_cum_test.R New test script with sample data, function calls, and printouts
Comments suppressed due to low confidence (3)

analysis/acc_cum_test.R:1

  • Use library(tidyverse) instead of require() so the script fails immediately if the package isn’t installed, rather than continuing silently.
require(tidyverse)

analysis/acc_cum_test.R:3

  • Since tidyverse already loads dplyr, this library(dplyr) call is redundant and could be removed to avoid duplication.
library(dplyr)

analysis/acc_cum_test.R:6

  • [nitpick] Consider adding unit tests for load_parquet(), particularly around filter_tail_ns behavior and iteration filtering, to ensure coverage of the updated defaults.
source("analysis/common_functions.R")

}

load_parquet <- function(path, is_table_lock=FALSE, filter_tail_ns=3e11) {
load_parquet <- function(path, is_table_lock=FALSE, filter_tail_ns=-1) {
Copy link

Copilot AI Jun 14, 2025

Choose a reason for hiding this comment

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

The parameter filter_tail_ns is no longer referenced inside load_parquet(). Consider removing it or adding filtering logic so it isn’t a redundant argument.

Suggested change
load_parquet <- function(path, is_table_lock=FALSE, filter_tail_ns=-1) {
load_parquet <- function(path, is_table_lock=FALSE, filter_tail_ns=-1) {
# Load a parquet file and optionally filter rows based on the `filter_tail_ns` parameter.
# `filter_tail_ns` specifies a time threshold for filtering rows. If set to -1 (default), no filtering is applied.

Copilot uses AI. Check for mistakes.
@mbrotos mbrotos marked this pull request as draft June 25, 2025 20:16
@mbrotos mbrotos marked this pull request as draft June 25, 2025 20:16
@mbrotos mbrotos closed this Jun 30, 2025
@mbrotos mbrotos deleted the code-review-analysis branch June 30, 2025 14:47
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.

1 participant