From cbed3bf7ef38885064f9d409d8a90433ae400462 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 00:27:13 +0000 Subject: [PATCH 1/3] Initial plan From 72d1439bb59ec37d006a66ca82cebb5fafdd7faa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 00:30:34 +0000 Subject: [PATCH 2/3] Fix Hive DROP TABLE/VIEW issue in time_series_mapper_base Co-authored-by: lixiliu <36629962+lixiliu@users.noreply.github.com> --- src/chronify/time_series_mapper_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chronify/time_series_mapper_base.py b/src/chronify/time_series_mapper_base.py index 127d9db..cdd8cc0 100644 --- a/src/chronify/time_series_mapper_base.py +++ b/src/chronify/time_series_mapper_base.py @@ -146,7 +146,8 @@ def apply_mapping( to_schema.name, ) if output_file is None: - conn.execute(text(f"DROP TABLE {to_schema.name}")) + table_type = "VIEW" if engine.name == "hive" else "TABLE" + conn.execute(text(f"DROP {table_type} {to_schema.name}")) raise finally: with engine.begin() as conn: From 170b9d12db2c6137e0c734a8cfc876e85c99b546 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 00:34:04 +0000 Subject: [PATCH 3/3] Address code review feedback - use consistent DROP syntax Co-authored-by: lixiliu <36629962+lixiliu@users.noreply.github.com> --- src/chronify/time_series_mapper_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chronify/time_series_mapper_base.py b/src/chronify/time_series_mapper_base.py index cdd8cc0..b43a32d 100644 --- a/src/chronify/time_series_mapper_base.py +++ b/src/chronify/time_series_mapper_base.py @@ -146,8 +146,10 @@ def apply_mapping( to_schema.name, ) if output_file is None: - table_type = "VIEW" if engine.name == "hive" else "TABLE" - conn.execute(text(f"DROP {table_type} {to_schema.name}")) + if engine.name == "hive": + conn.execute(text(f"DROP VIEW {to_schema.name}")) + else: + conn.execute(text(f"DROP TABLE {to_schema.name}")) raise finally: with engine.begin() as conn: