Skip to content

Conversation

@khustup2
Copy link
Contributor

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

Copilot AI review requested due to automatic review settings January 14, 2026 01:52
Copy link
Contributor

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 integrates PostgreSQL's statistics collector with deeplake tables, enabling proper autovacuum support. The changes allow deeplake tables to report DML operation statistics (INSERT, UPDATE, DELETE) to PostgreSQL's pgstat system, which autovacuum uses to determine when to run ANALYZE.

Changes:

  • Added statistics tracking calls (pgstat_count_heap_*) to DML operations in the table access method
  • Implemented VACUUM support with explicit rejection of VACUUM FULL for columnar storage
  • Enhanced ANALYZE support to properly handle columnar storage characteristics

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.

File Description
postgres/tests/py_tests/test_statistics_integration.py Comprehensive test suite validating statistics collection for INSERT/UPDATE/DELETE operations, ANALYZE behavior, and autovacuum integration
cpp/deeplake_pg/table_am.cpp Core implementation adding pgstat integration, VACUUM support, and improved ANALYZE scanning for columnar storage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +84 to +85
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +153 to +154
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +209 to +210
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +273 to +274
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +347 to +348
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +544 to +545
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +599 to +600
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +664 to +665
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +733 to +734
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +808 to +809
except:
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Bare except clauses should specify the exception type. Use except Exception: to catch all standard exceptions while allowing system exits and keyboard interrupts to propagate.

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

@khustup2 khustup2 merged commit d94fb55 into main Jan 14, 2026
6 checks passed
@khustup2 khustup2 deleted the statistics branch January 14, 2026 07:54
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