Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Added logic inside `divider` to check if `partition_name_below` and `partition_name_above` already exist via `pg_tables`. If they do, they are verified with a simple `SELECT 1` health check query. If they are both present and healthy, the `CREATE TABLE` queries are bypassed and the function safely returns early with an informative log message. Co-authored-by: soniapi <396009+soniapi@users.noreply.github.com>
0041177 to
6b36f9d
Compare
When
divideris called to create partition tables based on thedivider_value, it currently blindly executes theCREATE TABLEqueries which will fail if the tables were previously created (e.g. by manual migration). This change queriespg_tablesin thepublicschema to verify if both tables (objects_s_below_...andobjects_s_above_...) exist, runs a quickSELECT 1 FROM <partition> LIMIT 1;health check to ensure they are queryable, and if everything is correct, logs an informative message and bypasses theCREATE TABLEstatement execution.PR created automatically by Jules for task 13430159607150436215 started by @soniapi