From b0812dfe3541784b3dc015cd86cc8035a913bbe4 Mon Sep 17 00:00:00 2001 From: Nikhil Singh <124866156+Ritinikhil@users.noreply.github.com> Date: Sun, 11 Jan 2026 14:44:30 +0530 Subject: [PATCH] Fix variable name in unsupported format error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In build_table, after computing file_format = extension.lstrip(".").lower(), the code uses elif format == "csv": and later references format in error messages. format is the Python built-in, not the local variable; this branch never matches, so CSV inputs always fall through to the generic “not supported” error. --- python/datafusion/input/location.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/datafusion/input/location.py b/python/datafusion/input/location.py index b804ac18b..634f29bce 100644 --- a/python/datafusion/input/location.py +++ b/python/datafusion/input/location.py @@ -78,8 +78,7 @@ def build_table( msg = "TODO: Currently unable to support CSV input files." raise RuntimeError(msg) else: - msg = f"Input of format: `{format}` is currently not supported.\ - Only Parquet and CSV." + msg = f"Input of format: `{file_format}` is currently not supported. Only Parquet and CSV." raise RuntimeError(msg) # Input could possibly be multiple files. Create a list if so