Database | Origin Country | Details |
---|---|---|
ClickHouse | Russia | Developed by Yandex, open-sourced in 2016. Community-driven since. |
Greenplum | USA | Originally open-source; closed in 2024 by VMware/Broadcom. |
Apache Druid | USA | Built by Imply Data (Khosla Ventures-backed). Strong real-time analytics focus. |
DuckDB | Netherlands | Lightweight engine with academic roots. Strong GitHub community. |
StarRocks | China / USA | Developed by CelerData. Open-sourced under the Linux Foundation. |
Criteria | ClickHouse | Greenplum | Apache Druid | DuckDB | StarRocks |
---|---|---|---|---|---|
Columnar Storage | ✅ | ✅ | ✅ | ✅ | ✅ |
Open Source | ✅ (Apache 2.0) | ❌ (Closed Source) | ✅ | ✅ | ✅ (Linux Foundation Project) |
On-Premise Hosting | ✅ | ✅ | ✅ | ✅ | ✅ |
Security & RBAC | ✅ | ✅ | ✅ | ✅ | ✅ |
Tool Integration (Airbyte, Metabase) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Transforms array or any iterables of [key, value] pairs into object | |
const entries = [['name', 'JK'], ['age', '30']]; | |
Object.fromEntries(entries); | |
// {name: "JK", age: "30"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filter out successfull i.e fulfilled or resolved promises | |
const promises = [ fetch('index.html'), fetch('https://does-not-exist/') ]; | |
const results = await Promise.allSettled(promises); | |
const successfulPromises = results.filter(p => p.status === 'fulfilled'); | |
// Filter out failed promises | |
const promises = [ fetch('index.html'), fetch('https://does-not-exist/') ]; | |
const results = await Promise.allSettled(promises); | |
const errors = results.filter(p => p.status === 'rejected') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// English version | |
const formatter = new Intl.ListFormat('en'); | |
formatter.format(['january', 'february', 'march']) | |
// january, february, and march | |
const formatterConj = new Intl.ListFormat('en', {type: 'conjunction'}); | |
// january, february, and march => by defaut type is 'conjunction' | |
const formatterDisj = new Intl.ListFormat('en', {type: 'disjunction'}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For english version - it can be applied to second, minute, | |
// day, week, hour, month and quarter | |
const rtf = new Intl.RelativeTimeFormat('en'); | |
rtf.format(2, 'day') | |
// in 2 days | |
rtf.format(-2, 'day') | |
// two days ago |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Without .flatMap() | |
var arr1 = [1, 2, 3, 4]; | |
arr1.map(x => [x * 2]); | |
// [[2], [4], [6], [8]] | |
arr1.map(x => [x * 2]).flat(); | |
// [2,4,6,8] | |
// With .flatMap() => it is faster than above method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="teaser.jpg" loading="lazy" alt="…" /> | |
<iframe src="youtube.html" loading="lazy"></iframe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
#salary = '12345'; // => private class field | |
getSalary() { | |
this.#salary; | |
} | |
} | |
class jack = new Person(); | |
console.log(jack.#salary); // will prompt syntax error as it is private filed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr1 = [[1,2], [3,4], [5, 6]]; | |
arr1.flat(); | |
// [1,2,3,4,5,6] | |
var arr2 = [1, 2, [3, 4]]; | |
arr2.flat(); | |
// [1, 2, 3, 4] | |
var arr3 = [1, 2, [3, 4, [5, 6]]]; | |
arr3.flat(); |
NewerOlder