Commit Graph

26 Commits

Author SHA1 Message Date
Avi Kivity
f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
Drop the AGPL license in favor of a source-available license.
See the blog post [1] for details.

[1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
2024-12-18 17:45:13 +02:00
Jadw1
59498caeca db,cql3: Move part of cql3's function into db
Moving `function`, `function_name` and `aggregate_function` into
db namespace to avoid including cql3 namespace into query-request.
For now, only minimal subset of cql3 function was moved to db.
2022-07-18 15:25:41 +02:00
Avi Kivity
5937b1fa23 treewide: remove empty comments in top-of-files
After fcb8d040 ("treewide: use Software Package Data Exchange
(SPDX) license identifiers"), many dual-licensed files were
left with empty comments on top. Remove them to avoid visual
noise.

Closes #10562
2022-05-13 07:11:58 +02:00
Avi Kivity
fcb8d040e8 treewide: use Software Package Data Exchange (SPDX) license identifiers
Instead of lengthy blurbs, switch to single-line, machine-readable
standardized (https://spdx.dev) license identifiers. The Linux kernel
switched long ago, so there is strong precedent.

Three cases are handled: AGPL-only, Apache-only, and dual licensed.
For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0),
reasoning that our changes are extensive enough to apply our license.

The changes we applied mechanically with a script, except to
licenses/README.md.

Closes #9937
2022-01-18 12:15:18 +01:00
Pavel Solodovnikov
76bea23174 treewide: reduce header interdependencies
Use forward declarations wherever possible.

Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com>

Closes #8813
2021-06-07 15:58:35 +03:00
Avi Kivity
a55b434a2b treewide: extent copyright statements to present day 2021-06-06 19:18:49 +03:00
Dejan Mircevski
df3ea2443b cql3: Drop all uses_function methods
No one seems to call them except for other uses_function methods.

Tests: unit (dev)

Signed-off-by: Dejan Mircevski <dejan@scylladb.com>
2020-09-04 17:27:30 +02:00
Pavel Solodovnikov
6f6e6762ba cql: remove unused functions
It seems that the following functions are never used, delete them:
 * `function::has_reference_to`
 * `functions::get_overload_count`
 * `to_identifiers` in column_identifier.hh
 * `single_column_relation::get_map_key`

Tests: unit(dev, debug)

Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com>
Message-Id: <20200606115149.1770453-1-pa.solodovnikov@scylladb.com>
2020-06-08 11:28:57 +03:00
Pavel Solodovnikov
55a1d46133 cql: some more missing const qualifiers
There are several virtual functions in public interfaces named "is_*"
that clearly should be marked as "const", so fix that.
2019-11-26 17:57:51 +03:00
Rafael Ávila de Espíndola
d9337152f3 Use threads when executing user functions
This adds a requires_thread predicate to functions and propagates that
up until we get to code that already returns futures.

We can then use the predicate to decide if we need to use
seastar::async.

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
2019-11-07 08:41:08 -08:00
Rafael Ávila de Espíndola
4551691b5d return a const reference from return_type
We define data_type as

using data_type = shared_ptr<const abstract_type>;

Since it is a shared_ptr, it cannot be copied into another thread
since that would create a race condition incrementing the reference
counter.

In particular, before this patch it is not legal to call
return_type from another thread.

With this patch read only access from another thread is possible.

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
2019-04-08 11:07:45 -07:00
Duarte Nunes
fa2b0384d2 Replace std::experimental types with C++17 std version.
Replace stdx::optional and stdx::string_view with the C++ std
counterparts.

Some instances of boost::variant were also replaced with std::variant,
namely those that called seastar::visit.

Scylla now requires GCC 8 to compile.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
Message-Id: <20190108111141.5369-1-duarte@scylladb.com>
2019-01-08 13:16:36 +02:00
Vladimir Krivopalov
fb7d46fc2e Allow COUNT(*) and COUNT(1) to be queried with other aggregations or columns
Fixes #2218

Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com>
Message-Id: <c387d34969d5bcfb8b2bf42806e6e05a9b8a067c.1511487356.git.vladimir@scylladb.com>
2017-11-24 10:01:21 +00:00
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Pekka Enberg
d50139351f cql3: Use pragma once everywhere
There's no benefit to using C include guards so switch to pragma once
everywhere for consistency.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 16:32:56 +03:00
Avi Kivity
ab60ed8813 db: s/shared_ptr<abstract_type>/data_type/
Also replace derived types (map_type, collection_type, etc.).

As we'll change data_type's definition, this reduces the number of places
that need to be modified later, and is more readable.
2015-04-29 15:09:04 +03:00
Avi Kivity
e4276784b1 cql3: unprotect some 'class function' methods
'protected' is more strict in C++ than in Java, and these functions need
to be accessed from elsewhere.
2015-04-05 15:48:42 +03:00
Tomasz Grabiec
2902395129 Relax includes 2015-03-30 09:01:59 +02:00
Tomasz Grabiec
d243fb7a01 cql3: Pass sstrings as const& where applicable 2015-02-04 10:29:00 +01:00
Avi Kivity
08a7425b4a cql: fix minor build errors 2015-01-14 11:38:41 +02:00
Avi Kivity
8c65782af8 cql: move print operator from abstract_function to function
More usable in the base type.
2015-01-12 11:16:23 +02:00
Avi Kivity
1fe6bf687d db: de-pimpl data_type
Since origin tends to cast around, we should allow that too, by exposing
the implementation type and using a shared_ptr instead of a value class.
2015-01-05 15:55:30 +02:00
Avi Kivity
adc78b8959 cql: fix function/abstract_function inheritence
Make a few functions virtual and fix the types.
2014-12-31 16:04:22 +02:00
Avi Kivity
35608909b0 cql: use optional<bytes> for function arguments and return types
Allow null values.
2014-12-31 16:03:43 +02:00
Avi Kivity
b354fdc16d cql3: convert functions.Function to C++ 2014-12-24 14:18:21 +02:00