-
Notifications
You must be signed in to change notification settings - Fork 334
Run Standard.Snowflake in dual JVM mode
#14474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 13 commits
9f6e40c
afdf2cb
1e23004
f815f88
7fe4972
e59ef9c
a5298b5
a329d86
3907ebf
24212e1
7fe12e5
19aaa6d
a25e91c
00c3bdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,14 +107,14 @@ static <T> ColumnStorage<T> makeLocal(ColumnStorage<T> storage) { | |
| return (ColumnStorage<T>) new TypedStorage(localType, new Object[0]); | ||
| } | ||
| var data = storage.addressOfData(); | ||
| var size = Math.toIntExact(storage.getSize()); | ||
| var proxyType = storage.getType(); | ||
| var localType = StorageType.fromTypeCharAndSize(proxyType.typeChar(), proxyType.size()); | ||
| if (data != 0) { | ||
| var size = Math.toIntExact(storage.getSize()); | ||
| var validity = storage.addressOfValidity(); | ||
| var proxyType = storage.getType(); | ||
| var localType = StorageType.fromTypeCharAndSize(proxyType.typeChar(), proxyType.size()); | ||
| var localStorage = | ||
| switch (localType) { | ||
| case BooleanType type -> BoolBuilder.fromAddress(size, data, validity).seal(storage); | ||
| case BooleanType _ -> BoolBuilder.fromAddress(size, data, validity).seal(storage); | ||
| case IntegerType type -> | ||
| LongBuilder.fromAddress(size, data, validity, type).seal(storage, type); | ||
| case FloatType type -> | ||
|
|
@@ -126,10 +126,23 @@ static <T> ColumnStorage<T> makeLocal(ColumnStorage<T> storage) { | |
| assert assertSameStorages(storage, localStorage); | ||
| return (ColumnStorage<T>) localStorage; | ||
| } else { | ||
| if (BuilderUtil.LOG.isTraceEnabled()) { | ||
| var t = storage.getType(); | ||
| BuilderUtil.LOG.trace( | ||
| "makeLocal unsuccessful for {}:{} size {}", t.typeChar(), t.size(), storage.getSize()); | ||
| switch (localType) { | ||
| case BigIntegerType _ -> { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| var b = Builder.getForBigInteger(size, null); | ||
| b.appendBulkStorage(storage); | ||
| var localStorage = b.seal(); | ||
| return (ColumnStorage<T>) localStorage; | ||
| } | ||
| default -> { | ||
| if (BuilderUtil.LOG.isTraceEnabled()) { | ||
| var t = storage.getType(); | ||
| BuilderUtil.LOG.trace( | ||
| "makeLocal unsuccessful for {}:{} size {}", | ||
| t.typeChar(), | ||
| t.size(), | ||
| storage.getSize()); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| return storage; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,9 +14,12 @@ | |
| import org.enso.table.problems.ProblemAggregator; | ||
| import org.graalvm.polyglot.Context; | ||
| import org.graalvm.polyglot.Value; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| /** A representation of a column. Consists of a column name and the underlying storage. */ | ||
| public final class Column { | ||
| private static final Logger LOG = LoggerFactory.getLogger(Column.class); | ||
| private final String name; | ||
| private final ColumnStorage<?> storage; | ||
|
|
||
|
|
@@ -29,7 +32,15 @@ public final class Column { | |
| public Column(String name, ColumnStorage<?> storage) { | ||
| ensureNameIsValid(name); | ||
| this.name = name; | ||
| this.storage = Proxy.isProxyClass(storage.getClass()) ? Builder.makeLocal(storage) : storage; | ||
| var isProxy = Proxy.isProxyClass(storage.getClass()); | ||
| this.storage = isProxy ? Builder.makeLocal(storage) : storage; | ||
| var type = this.storage.getType(); | ||
| LOG.debug( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
sbt:enso> runEngineDistribution
--vm.D=org.enso.table.Logger.level=trace
--env ENSO_SNOWFLAKE_USER=aaa
--env ENSO_SNOWFLAKE_PASSWORD=bbb
--env ENSO_SNOWFLAKE_ACCOUNT=ccc
--env ENSO_SNOWFLAKE_DATABASE=CI_TEST_DB
--run test/Snowflake_Tests nicnicnic
8 tests succeeded.
0 tests failed.
0 tests skipped.
0 groups skipped.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "Column[{}] of {}:{} type with size: {}", | ||
| name, | ||
| type.typeChar(), | ||
| type.size(), | ||
| storage.getSize()); | ||
| } | ||
|
|
||
| public static boolean isColumnNameValid(String name) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.