Skip to content

Commit

Permalink
Fix legacy expr value factory
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <daichen@amazon.com>
  • Loading branch information
dai-chen committed Apr 26, 2023
1 parent 073493b commit cc43408
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package org.opensearch.sql.legacy.expression.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -61,6 +62,8 @@ public static ExprValue from(Object o) {
return booleanValue((Boolean) o);
} else if (o instanceof Double) {
return doubleValue((Double) o);
} else if (o instanceof BigDecimal) {
return doubleValue(((BigDecimal) o).doubleValue());
} else if (o instanceof String) {
return stringValue((String) o);
} else {
Expand Down

0 comments on commit cc43408

Please sign in to comment.