Comments (3)
it is an excellent spot, thanks. I've added your changes to repository.
As far as partitioning by "interval" type, would this work if you had different journals for separate interval types?
JournalWriter<Quote> w1 = factory.writer(Quote.class, "quote_1");
JournalWriter<Quote> w3 = factory.writer(Quote.class, "quote_3");
JournalWriter<Quote> w5 = factory.writer(Quote.class, "quote_5");
JournalWriter<Quote> w60 = factory.writer(Quote.class, "quote_60");
I would make interval type a byte (to save disk space):
public void append(Quote q) {
switch (q.getType()) {
case 1:
w1.append(q);
break;
case 3:
w3.append(q);
break;
case 5:
w5.append(q);
break;
case 60:
w60.append(q);
break;
}
}
It should be possible to search by symbol + interval. First you declare where symbols are:
JournalFactory factory1 = new JournalFactory(
new JournalConfigurationBuilder() {{
$(Quote.class)
// name of symbol field + total number of values it can have (hint)
.$sym("sym").index().valueCountHint(15)
// name of timestamp field
.$ts("timestamp")
;
}}.build("path")
);
Next you can search them:
for (Quote q : w.query().all().withSymValues("sym", "ABC", "CDE").slice(Dates.interval(a, b)).asResultSet()) {
...
}
hope this helps,
from questdb.
Really appreciate your quick response!
I'm sorry for my ignorance, but is there any way to get the changes through maven? Not sure if you do daily builds etc.
I wasn't aware that I can bypass journal name to factory.writer. Missed that. Thanks a lot! I think that should work then.
from questdb.
No problem, nfsdb should be better documented.
If you add this to your pom.xml you should be able to pull snapshot in (2.0.1-SNAPSHOT):
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
from questdb.
Related Issues (20)
- flaky test - RetryIODispatcherTest.testInsertWaitsExceedsRerunProcessingQueueSizeLoop
- Unsupported machine HOT 15
- Support Aggregation Functions with GROUPS Clause in Window Functions
- CASE returning unexpected value for timestamp IS NULL comparison HOT 1
- COALESCE failing for NULL timestamps
- Symbol incorrectly written to table in 7.4.2 when multiple processes sending to QuestDB HOT 7
- Web Console not available after 7.3.7 HOT 8
- JIT bug: COUNT with FLOAT not equals returns wrong results with null values
- split_part returns result from previous row when current row does not have the part HOT 1
- The timestamp was forcibly changed. Procedure HOT 2
- Incorrect result when having NULL with IN operation HOT 1
- HTTPS redirect when using FQDN instead of IP HOT 2
- SAMPLE BY breaks with `last(timestamp)`
- Error while parsing timestamps with times between midnight and 1am formatted in the 12-hour clock convention HOT 2
- Support of Decimal64 type wanted
- Incorrect result when having null in case clause
- Settings pg.net.bind.to=0 Causes Crash on Ubuntu
- NPE in window function with partition by clause
- Flaky WalWriterFuzzTest.testWalMetadataChangeHeavy
- HttpResponseSink disconnected [errno=10054, fd=32624]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from questdb.