-
Notifications
You must be signed in to change notification settings - Fork 13
.net 8.0 #62
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: main
Are you sure you want to change the base?
.net 8.0 #62
Conversation
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.
Re: Demos/FeedDemo/Program.cs
Running
q -p 5001
q).u.upd:{[tbl;row] insert[tbl](row)}
q)mytable:([]time:`timespan$();sym:`symbol$();price:`float$();size:`long$())
get many `type errors. Just running ParallelInsertRows with the q instance changed to add printing of message received i.e.
q).z.ps:{0N!x;value x}
see what's causing the errors (mismatching types for the table updates):
(".u.upd";`mytable;(0D00:00:00.000000000;`SYMBOL;49i;300))
'type
The code should prob have been
// Assumes a remote schema of mytable:([]time:`timespan$();sym:`symbol$();price:`float$();size:`long$())
object[] row = new object[]
{
new c.KTimespan(i),
"SYMBOL",
Convert.ToDouble(i)
300L
};
Though since data is being sent on threads, each thread is interleaving with each other giving different order each time (as expected). Order is the same per thread, but not across threads. e.g. first run, looking at first 5 entries to table when only running parallel inserts:
q)5#mytable
time sym price size
--------------------------------------
0D00:00:00.000000000 SYMBOL 0 300
0D00:00:00.000000000 SYMBOL 75 300
0D00:00:00.000000000 SYMBOL 50 300
0D00:00:00.000000000 SYMBOL 25 300
0D00:00:00.000000000 SYMBOL 26 300
next run has different order, as expected due to threading
q)5#mytable
time sym price size
--------------------------------------
0D00:00:00.000000000 SYMBOL 50 300
0D00:00:00.000000000 SYMBOL 0 300
0D00:00:00.000000000 SYMBOL 75 300
0D00:00:00.000000000 SYMBOL 25 300
0D00:00:00.000000000 SYMBOL 76 300
Depending on use-case, this may not be desirable & will leave it off the demo as closer to programming paradigm rather than API example.
@sshanks-kx could you please take a look? :-) |
See comment above regarding parallel inserts. Will not be adding it in for now. Thanks for raising. |
Oh ok but if I will push PR with .net 8 only? |
No description provided.