Сannot replace a column with a column with the same name

When I try to use the method replace(columnToReplace, newColumn) and want to replace one column with another with the same name, an error appears:

Uncaught Invalid argument(s): Column named ‘test 1’ already exists

Hi Olesia, thanks for reporting! I will fix it.

1 Like

Hi Olesia! Can’t reproduce the error. Could you provide an example where this error occurs when you are using the replace function?

Hi Aydar, sure!

Steps to reproduce:

Create a column using any of the structureSearch methods (similarity, substructure). Give it a name and add it to the table.
Create another column using any of the structureSearch methods (similarity, substructure). Give it exactly the same name as the first time and use the replace method.

Result: an error occurs that a column with the same name already exists.

Thank you, Olesia! We’ve fixed the behavior of the column replace method. Check, please, if there are still any problems with this function.