wrangler column "field" property not defined

Description

1. Wrangler some data
2. add a new formula but dont give it an alias
3. repeat above adding new formulas but dont give an alias
4. after adding a few columns try to rename one of the original columns (i.e. the first ones)
5. it will throw a "Cannot replace null") error.

Looking at the code in the column-delegate.ts it attempts to build the rename formula with a 'select' the fields getting the other column 'field' properties.

In the ColumnDelegate.prototype.toFormula it will call: getColumnFieldName(column) which will return the column.field.

the column.field is "undefined" for those columns that were added without an alias.

Proposed solution is to return column.field || column.name if the column.field is undefined.

https://github.com/Teradata/kylo/commit/27c743bd11fd1e964d24217dafd6338cf0772645

Environment

None
Done

Assignee

Scott Reisdorf

Reporter

Scott Reisdorf

Labels

None

Reviewer

None

Story point estimate

None

Components

Fix versions

Priority

Medium