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

[GSK-2179] Slicing function DB insert fails because of the long name #1605

Closed
martjushev opened this issue Nov 13, 2023 · 1 comment · Fixed by #1639
Closed

[GSK-2179] Slicing function DB insert fails because of the long name #1605

martjushev opened this issue Nov 13, 2023 · 1 comment · Fixed by #1639
Assignees
Labels
Backend bug Something isn't working good first issue Good for newcomers

Comments

@martjushev
Copy link

Issue Type

Bug

Source

docker

Giskard Library Version

2.0.2

Giskard Hub Version

2.0.2

OS Platform and Distribution

macOS Ventura 13.4

Python version

3.10

Installed python packages

No response

Current Behaviour?

I'm using featuretools lib to generate features. It can generate pretty long names for the features, like `TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)`. As a result, the automatic slicing function name is longer than 255 characters and a DB insert fails. I believe it makes sense to increase the limit.

Standalone code OR list down the steps to reproduce the issue

results = scan(giskard_model, giskard_dataset, only=["performance"])
test_suite = results.generate_test_suite("performance")
test_suite.upload(client, project_name)

Relevant log output

GiskardError: Internal Server Error: could not execute batch [Batch entry 0 insert into callable_functions (code,display_name,doc,module,module_doc,name,tags,version,cell_level,clauses,column_type,process_type,callable_type,uuid) values ('','`TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)` >= 14.512 AND `TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)` < 40748.859','Automatically generated slicing function',NULL,NULL,'`TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)` >= 14.512 AND `TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)` < 40748.859','["pickle","scan"]',1,'FALSE','[{"columnName":"TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)","comparisonType":"GREATER_THAN_EQUALS","value":14.512499809265137},{"columnName":"TIME_SINCE_LAST_MIN(my_date_column123, my_numeric_column123)","comparisonType":"LOWER_THAN","value":40748.859375}]',NULL,'CLAUSES','SLICING','af55a8b9-518f-5b71-bd1d-c16a649dec36'::uuid) was aborted: ERROR: value too long for type character varying(255)  Call getNextException to see other errors in the batch.] [insert into callable_functions (code,display_name,doc,module,module_doc,name,tags,version,cell_level,clauses,column_type,process_type,callable_type,uuid) values (?,?,?,?,?,?,?,?,?,?,?,?,'SLICING',?)]; SQL [insert into callable_functions (code,display_name,doc,module,module_doc,name,tags,version,cell_level,clauses,column_type,process_type,callable_type,uuid) values (?,?,?,?,?,?,?,?,?,?,?,?,'SLICING',?)]
@Googleton Googleton added bug Something isn't working Backend labels Nov 13, 2023
@kevinmessiaen kevinmessiaen changed the title Slicing function DB insert fails because of the long name [GSK-2179] Slicing function DB insert fails because of the long name Nov 21, 2023
@kevinmessiaen kevinmessiaen self-assigned this Nov 21, 2023
@kevinmessiaen kevinmessiaen added the good first issue Good for newcomers label Nov 21, 2023
@kevinmessiaen
Copy link
Member

@martjushev

Thanks for reporting the issue, we will fix this issue ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend bug Something isn't working good first issue Good for newcomers
3 participants