File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
gateway-ha/src/main/java/io/trino/gateway/ha/router Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 2121import io .trino .gateway .ha .persistence .dao .QueryHistoryDao ;
2222import org .jdbi .v3 .core .Jdbi ;
2323
24+ import java .math .BigDecimal ;
2425import java .time .Instant ;
2526import java .time .LocalDateTime ;
2627import java .time .ZoneId ;
@@ -144,7 +145,7 @@ public List<DistributionResponse.LineChart> findDistribution(Long ts)
144145 List <DistributionResponse .LineChart > resList = new ArrayList <>();
145146 for (Map <String , Object > model : results ) {
146147 DistributionResponse .LineChart lineChart = new DistributionResponse .LineChart ();
147- long minute = ( long ) Float . parseFloat (model .get ("minute" ).toString ());
148+ long minute = new BigDecimal (model .get ("minute" ).toString ()). longValue ( );
148149 Instant instant = Instant .ofEpochSecond (minute * 60L );
149150 LocalDateTime dateTime = LocalDateTime .ofInstant (instant , ZoneId .systemDefault ());
150151 DateTimeFormatter formatter = DateTimeFormatter .ofPattern ("HH:mm" );
You can’t perform that action at this time.
0 commit comments