From 00118fb55636e8da9c9c8ba92ba05acfde0ba818 Mon Sep 17 00:00:00 2001 From: rajmi Date: Sat, 5 Apr 2025 21:08:43 -0400 Subject: [PATCH] Compare type dict column name with actual column name with casefold. If the column name is passed as all caps or snakecase then the column matching will fail and it will raise indexError which is hard to detect. --- .../expectations/core/expect_column_values_to_be_of_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/great_expectations/expectations/core/expect_column_values_to_be_of_type.py b/great_expectations/expectations/core/expect_column_values_to_be_of_type.py index 9b4eb4261dcc..b9c08dc8c560 100644 --- a/great_expectations/expectations/core/expect_column_values_to_be_of_type.py +++ b/great_expectations/expectations/core/expect_column_values_to_be_of_type.py @@ -566,7 +566,7 @@ def _validate( actual_column_type = [ type_dict["type"] for type_dict in actual_column_types_list - if type_dict["name"] == column_name + if type_dict["name"].casefold() == column_name.casefold() ][0] if isinstance(execution_engine, PandasExecutionEngine):