Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3866,9 +3866,6 @@ lazy val `engine-runner` = project
.listFiles("*.jar")
.map(_.getAbsolutePath()) ++
`std-aws-polyglot-root`.listFiles("*.jar").map(_.getAbsolutePath()) ++
`std-snowflake-polyglot-root`
.listFiles("*.jar")
.map(_.getAbsolutePath()) ++
`std-tableau-polyglot-root`
.listFiles("*.jar")
.map(_.getAbsolutePath()) ++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
- dec x:(Standard.Base.Data.Text.Text|Standard.Base.Data.Numbers.Integer|Standard.Base.Data.Numbers.Float) mc:(Standard.Base.Data.Numeric.Math_Context.Math_Context|Standard.Base.Nothing.Nothing)= -> Standard.Base.Data.Decimal.Decimal!(Standard.Base.Errors.Common.Arithmetic_Error|Standard.Base.Data.Numbers.Number_Parse_Error)
- error_if_from_float left:Standard.Base.Any.Any right:Standard.Base.Any.Any ~action:Standard.Base.Any.Any -> Standard.Base.Any.Any
- from_big_decimal that:Standard.Base.Any.Any -> Standard.Base.Any.Any
- get_big_decimal that:Standard.Base.Data.Decimal.Decimal -> Standard.Base.Any.Any
- handle_java_exception ~action:Standard.Base.Any.Any extra_message:Standard.Base.Data.Text.Text= -> Standard.Base.Any.Any
- handle_number_format_exception ~action:Standard.Base.Any.Any -> Standard.Base.Any.Any
- handle_precision_loss original_value:Standard.Base.Any.Any conversion_result:Standard.Base.Data.Decimal.ConversionResult -> Standard.Base.Any.Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1464,12 +1464,6 @@ Decimal.from (that : Float) = Decimal.from_float that explicit=False
Float.from (that : Decimal) =
attach_loss_of_numeric_precision that that.to_float

## ---
private: true
---
Helper method allowing access to the backing field.
get_big_decimal (that : Decimal) = that.big_decimal

## ---
private: true
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from Standard.Base import all
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
import Standard.Base.Errors.Illegal_State.Illegal_State
from Standard.Base.Data.Decimal import get_big_decimal

from Standard.Table import Value_Type

Expand Down Expand Up @@ -35,7 +34,7 @@ type Statement_Setter
Nothing -> stmt.setNull i Types.NULL
_ : Boolean -> stmt.setBoolean i value
_ : Integer -> jdbc_value_setter.setInteger stmt i value
_ : Decimal -> stmt.setBigDecimal i (get_big_decimal value)
_ : Decimal -> jdbc_value_setter.setBigDecimal stmt i value.to_text
_ : Float -> stmt.setDouble i value
_ : Text -> stmt.setString i value
_ : Date_Time ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from Standard.Base import all
import Standard.Base.Errors.Common.Index_Out_Of_Bounds
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
import Standard.Base.Errors.Illegal_State.Illegal_State
from Standard.Base.Data.Decimal import from_big_decimal, get_big_decimal
from Standard.Base.Data.Decimal import from_big_decimal

import project.Internal.Value_Type_Helpers
import project.Value_Type.Bits
Expand Down Expand Up @@ -89,7 +89,7 @@ closest_storage_type value_type = case value_type of
This step is unnecessary for primitive and builtin values, but necessary for
values such as `Decimal`/`BigDecimal`.
enso_to_java x = case x of
_ : Decimal -> get_big_decimal x
_ : Decimal -> BigDecimal.new x.to_text
_ -> x

## ---
Expand Down
10 changes: 5 additions & 5 deletions project/GraalVM.scala
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ object GraalVM {
// Expected production NI sizes deduced from sizes on latest
// nightly builds: https://github.com/enso-org/enso/pull/12843#issuecomment-2869897463
// With maximal size relaxed by 30 MB.
private val windowsX64Release = NativeImageSize(200, 470)
private val linuxX64Release = NativeImageSize(200, 490)
private val macX64Release = NativeImageSize(200, 457)
private val macARM64Release = NativeImageSize(200, 473)
private val testNISize = NativeImageSize(100, 592)
private val windowsX64Release = NativeImageSize(200, 390)
private val linuxX64Release = NativeImageSize(200, 410)
private val macX64Release = NativeImageSize(200, 380)
private val macARM64Release = NativeImageSize(200, 390)
private val testNISize = NativeImageSize(100, 510)
}

/** Has the user requested to use Espresso for Java interop? */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.enso.database;

import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
Expand Down Expand Up @@ -65,4 +66,10 @@ public void setLocalDate(PreparedStatement stmt, int columnIndex, LocalDate loca
throws SQLException {
stmt.setObject(columnIndex, localDate, Types.DATE);
}

public void setBigDecimal(PreparedStatement stmt, int columnIndex, String value)
throws SQLException {
var big = new BigDecimal(value);
stmt.setBigDecimal(columnIndex, big);
}
}
Loading