kz930 opened a new issue, #8079:
URL: https://github.com/apache/texera/issues/8079
### What happened?
The operator already answers an empty table with an error page, then stacks
the two configured columns and hands them to `ff.create_dendrogram` as they are:
```python
if table.empty:
yield {'html-content': self.render_error("input table is empty.")}
return
x = np.array(table[...])
y = np.array(table[...])
data = np.column_stack((x, y))
fig = ff.create_dendrogram(data, labels=labels, color_threshold=...)
```
Two tables that pass that guard end the run anyway.
A blank cell in either column. The columns are constrained to numeric types,
but a numeric column can still hold a null, which arrives as NaN, and scipy
refuses it: "The condensed distance matrix must contain only finite values."
A single row. There is no distance between one observation and itself, and
scipy raises "The number of observations cannot be determined on an empty
distance matrix". Two rows cluster fine, as do duplicate labels and two
identical points.
I expected both to reach the error page that is already there, the way Bar
Chart drops the rows missing either configured column and then reports an
emptied table.
### How to reproduce?
1. A table with numeric x and y columns, a label column, and three rows, one
of which has a blank x.
2. Connect Dendrogram and point Value X, Value Y and Labels at them.
3. Run.
It ends with the error below. Filling the blank and cutting the table down
to one row ends it with the other message instead.
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Relevant log output
```shell
ValueError: The condensed distance matrix must contain only finite values.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]