Problem on set method of Column<T> #1016
Unanswered
JaschenDonri
asked this question in
Q&A
Replies: 1 comment 1 reply
-
In general, you should use the specific types. The generic types are there
to allow for the generally poor integration of Java primitives into the
world of Java generics. In tablesaw, using generics leads to auto-boxing of
entire columns, which is terrible for memory consumption and performance.
…On Wed, Oct 20, 2021 at 9:46 AM JaschenDonri ***@***.***> wrote:
Here are something I can't figure out:
when I'm using a specific column type, the set method works well, but when
it's a generics column, the set method doesn't match the parameter.
I think the generics column set is very often used, can anyone tell me how
to use it or provide a workaround other than the switch-case structure?
Following is the test case:
// works well
StringColumn test1 = StringColumn.create("test");
test1.set(i,test1,i-1);
test1.set(i,test1.get(i-1));
// doesn't work
Column<?> test2 = StringColumn.create("test");
test1.set(i,test2,i-1);
Object o = test2.get(i - 1);
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1016>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2FPARC5YV7QHV62NEG47LUH3BZZANCNFSM5GLWETVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is something I can't figure out with release 0.40.0:
when I'm using a specific column type, the set method works well, but when it's a generics column, the set method doesn't match the parameter.
I think the generics column set is very often used, can anyone tell me how to use it or provide a workaround other than the switch-case structure?
Following is the test case:
Beta Was this translation helpful? Give feedback.
All reactions