Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1032642: Fix table name truncation in local testings error #1230

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Added support for an optional `date_part` argument in function `last_day`

### Bug Fixes

- Fixed a bug that truncated table names in error messages while running a plan with local testing enabled.

## 1.12.0 (2024-01-30)

### New Features
Expand Down
3 changes: 2 additions & 1 deletion src/snowflake/snowpark/mock/_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,9 @@ def execute_mock_plan(
return res_df
else:
db_schme_table = parse_table_name(entity_name)
table = ".".join([part.strip("\"'") for part in db_schme_table[:3]])
raise SnowparkSQLException(
f"Object '{db_schme_table[0][1:-1]}.{db_schme_table[1][1:-1]}.{db_schme_table[2][1:-1]}' does not exist or not authorized."
f"Object '{table}' does not exist or not authorized."
)
if isinstance(source_plan, Aggregate):
child_rf = execute_mock_plan(source_plan.child)
Expand Down
Loading