Skip to content

Commit ac378cd

Browse files
authored
Merge pull request Caltech-IPAC#1701 from Caltech-IPAC/FIREFLY-1649-heatmap-nan
FIREFLY-1649: NaNs values should not show up in Heatmap
2 parents 53402a1 + e0ca028 commit ac378cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/firefly/java/edu/caltech/ipac/firefly/server/query/DecimationProcessor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ void createDecimateTable(TableServerRequest treq, DbAdapter dbAdapter) throws Da
8181
String sql = """
8282
CREATE TABLE %s as (
8383
SELECT %s as "%s", %s as "%s", ROW_NUM as "rowidx", ROW_NUMBER() OVER () AS %s, ROW_NUMBER() OVER () AS %s,
84-
FROM %s)
85-
""".formatted(tblName, deciInfo.getxExp(), deciKey.getXCol(), deciInfo.getyExp(), deciKey.getYCol(), ROW_NUM, ROW_IDX, dataTbl);
84+
FROM %s WHERE "%s" IS NOT NULL AND "%s" IS NOT NULL )
85+
""".formatted(tblName, deciInfo.getxExp(), deciKey.getXCol(), deciInfo.getyExp(), deciKey.getYCol(), ROW_NUM, ROW_IDX, dataTbl, deciKey.getXCol(), deciKey.getYCol());
8686
dbAdapter.execUpdate(sql);
8787
} else {
8888
String sql = """
8989
CREATE TABLE %s as (
9090
SELECT FIRST(%s) as "%s", FIRST(%s) as "%s", FIRST(ROW_NUM) as "rowidx", count(*) as "weight", %s as "dkey", ROW_NUMBER() OVER () AS %s, ROW_NUMBER() OVER () AS %s,
91-
FROM %s
91+
FROM %s WHERE "%s" IS NOT NULL AND "%s" IS NOT NULL
9292
GROUP BY "dkey" )
93-
""".formatted(tblName, deciInfo.getxExp(), deciKey.getXCol(), deciInfo.getyExp(), deciKey.getYCol(), deciFunc, ROW_NUM, ROW_IDX, dataTbl);
93+
""".formatted(tblName, deciInfo.getxExp(), deciKey.getXCol(), deciInfo.getyExp(), deciKey.getYCol(), deciFunc, ROW_NUM, ROW_IDX, dataTbl, deciKey.getXCol(), deciKey.getYCol());
9494
dbAdapter.execUpdate(sql);
9595

9696
// add decimation info to the returned table

0 commit comments

Comments
 (0)