pyos
6e05c5ace4
compilePrologue() isn't particularly useful after all.
...
Basically the only thing it can do that compile() can't is create 'alloca'
instructions, which are only needed to get pointers to stack variables.
Given that dynamically-sized allocations aren't possible with this API,
such pointers are probably completely pointless (heh).
2018-04-28 18:11:23 +03:00
pyos
1ffc2a0775
Make LLVMFunction monotonicity computation shorter (and fix a typo-bug)
2018-04-28 17:41:24 +03:00
pyos
a1eb938ed2
Inline nullable number constants into compiled code.
...
Also, protect against some segfaults during compilation by checking
correctness of the type returned by compile().
2018-04-28 17:12:00 +03:00
pyos
ccc895d162
Represent nullable types as pairs instead of pointers.
...
Turns out LLVM has insertvalue & extractvalue for struct in registers. This is
faster than pointers because null checks are now subject to more optimizations.
2018-04-28 14:12:23 +03:00
pyos
5c75342d54
Check nativity of all types *before* calling isCompilable
2018-04-28 01:03:52 +03:00
pyos
979c4d959f
Let jit-compilable functions deal with NULLs themselves.
...
And provide a default implementation of compile() for nullable columns
that actually works and is consistent with execute().
2018-04-28 00:34:27 +03:00
pyos
49b61cd27d
Refactor LLVMFunction to make extending to DataTypeNullable easier
2018-04-27 18:44:38 +03:00
pyos
b4d527ee85
Inline compile-time constants into jitted functions.
2018-04-26 14:30:16 +03:00
pyos
9ae5fe1b6d
Minor style fixes
2018-04-25 18:33:58 +03:00
pyos
854f85dd9b
Put #if USE_EMBEDDED_COMPILER in ExpressionJIT.{cpp,h}
2018-04-25 18:19:22 +03:00
pyos
d59b0d7ec0
Add IColumn::getRawData to fixed-contiguous columns
2018-04-25 18:16:48 +03:00
pyos
6c275c27d0
Remove an unnoticed debug return
2018-04-25 16:44:24 +03:00
pyos
c419d5a1a5
Poison only columns actually used by ARRAY_JOIN and JOIN
2018-04-25 16:01:06 +03:00
pyos
5482282943
Implement informational methods for LLVMFunction
2018-04-25 16:01:06 +03:00
pyos
af7ecd4c4a
Move function compilation before insertion of REMOVE_COLUMNs
2018-04-25 16:01:06 +03:00
pyos
162a0c8b33
Fix some comments' style
2018-04-25 16:01:06 +03:00
pyos
0da110234c
Do not compile the jit if USE_EMBEDDED_COMPILER is disabled
2018-04-25 16:01:00 +03:00
pyos
1bece1de46
Support nullable columns (with default behavior) in jitted functions
2018-04-25 13:37:26 +03:00
pyos
4bd0906613
Fix some comments
2018-04-25 13:37:26 +03:00
pyos
df2d2e0b25
Tweak the jit compilation API to be more amenable to lazy computation
2018-04-25 13:37:26 +03:00
pyos
b2077a466a
Inline jit-compilable functions into other jit-compilable functions
2018-04-25 13:37:26 +03:00
pyos
3810173103
Remove IFunction::createResultColumn.
...
Given that the list of supported types is hardcoded in
LLVMContext::Data::toNativeType, this method is redundant because
LLVMPreparedFunction can create a ColumnVector itself.
2018-04-25 13:37:26 +03:00
pyos
6b526f784c
Enable the default set of LLVM optimization passes
...
I honestly can't tell if they work. LLVM has surprisingly bad API documentation.
2018-04-25 13:37:26 +03:00
pyos
5f1bf11ede
Implement a loop over the columns in jit-compiled code
2018-04-25 13:37:25 +03:00
pyos
407008a4d9
Separate jit-compilability checks from actual compilation
2018-04-25 13:37:25 +03:00
pyos
e96a5e8344
Implement JIT compilation, without a loop for now.
...
It actually seems to work, so long as you only have one row that is. E.g.
> select something(cast(number + 6 as Float64), cast(number + 2 as Float64)) from system.numbers limit 1';
8
with this IR:
define void @"something(CAST(plus(number, 6), 'Float64'), CAST(plus(number, 2), 'Float64'))"(void**, i8*, double*) {
entry:
%3 = load void*, void** %0
%4 = bitcast void* %3 to double*
%5 = load double, double* %4
%6 = getelementptr void*, void** %0, i32 1
%7 = load void*, void** %6
%8 = bitcast void* %7 to double*
%9 = load double, double* %8
%10 = fadd double %5, %9
store double %10, double* %2
ret void
}
2018-04-25 13:37:25 +03:00
pyos
b398ffbaba
Map all number types to LLVM types.
...
The example from the previous commit doesn't need a cast to Float64 anymore.
2018-04-25 13:37:25 +03:00
pyos
851684de51
Add a JIT interface for row-wise default-nullable functions.
...
Not actually implemented, though. It does print out some jit-compiled stuff,
but that's about it. For example, this query:
select number from system.numbers where something(cast(number as Float64)) == 4
results in this on server's stderr:
define double @"something(CAST(number, 'Float64'))"(void**, i8*, void*) {
"something(CAST(number, 'Float64'))":
ret double 1.234500e+04
}
(and an exception, because that's what the non-jitted method does.)
As one may notice, this function neither reads the input (first argument;
tuple of arrays) nor writes the output (third argument; array), instead
returning some general nonsense.
In addition, `#if USE_EMBEDDED_COMPILER` doesn't work for some reason,
including LLVM headers requires -Wno-unused-parameter, this probably only
works on LLVM 5.0 due to rampant API instability, and I'm definitely
no expert on CMake. In short, there's still a long way to go.
2018-04-25 13:37:25 +03:00
Alexey Milovidov
499b67642f
Allow to startup with replicated tables in readonly mode when there is no ZooKeeper configured [#CLICKHOUSE-2]
2018-04-21 21:41:06 +03:00
Alexey Milovidov
c087449023
Fixed error #2246
2018-04-20 22:14:04 +03:00
Alexey Milovidov
6b88a2a7a5
Better info in log #2246
2018-04-20 04:14:04 +03:00
Alexey Milovidov
70be882b64
Renamed PK to Key where it's appropriate #2246
2018-04-20 03:27:25 +03:00
Alexey Milovidov
d71b3a95ef
Renamed PK to Key where it's appropriate #2246
2018-04-20 03:20:50 +03:00
Alexey Milovidov
ce0ac3f8f8
Fixed error with Sets, part 2 #2246
2018-04-20 00:34:04 +03:00
Alexey Milovidov
a6c194fa6d
Insignificant change #2246
2018-04-19 23:32:56 +03:00
Alexey Milovidov
41428e4a11
Allowed to read files by table function "file" inside "user_files_path" #2164
2018-04-19 08:32:09 +03:00
Alexey Milovidov
b4bf2f0c09
Added comment [#CLICKHOUSE-2]
2018-04-19 00:14:47 +03:00
Alexey Milovidov
b6fcb808fe
Updated old code [#CLICKHOUSE-2]
2018-04-18 23:18:18 +03:00
Alexey Milovidov
3eff0184fa
Added set size checking when set from subquery is used for index; removed harmful feature for special support of (a, b) IN (SELECT (a, b)) instead of (a, b) IN (SELECT a, b) [#CLICKHOUSE-2]
2018-04-18 22:38:40 +03:00
Alexey Milovidov
3bb2fa4702
Fixed bad code [#CLICKHOUSE-2]
2018-04-18 21:44:02 +03:00
alexey-milovidov
089e71d9a5
Merge pull request #2235 from yandex/small-enhancements
...
Small enhancements
2018-04-17 22:45:01 +03:00
Vitaliy Lyudvichenko
400ad55754
Support allow_databases in distributed DDL. [#CLICKHOUSE-3]
...
Resolves #2189
2018-04-17 22:33:58 +03:00
Vitaliy Lyudvichenko
5536bf202c
Allow SELECT FROM system.processes while max_queries limit is exceeded. [#CLICKHOUSE-3670]
2018-04-17 20:08:15 +03:00
Vitaliy Lyudvichenko
604c7071c3
Fixed a long lock of ProcessList when KILL QUERY is called. [#CLICKHOUSE-3706]
2018-04-17 18:16:32 +03:00
Vitaliy Lyudvichenko
f642d0828e
Avoid freezing of KILL QUERY. [#CLICKHOUSE-3706]
2018-04-17 17:29:52 +03:00
alexey-milovidov
17dd218338
Merge pull request #2202 from proller/fix15
...
CLICKHOUSE-3700: Fix empty password on replica query
2018-04-16 23:18:47 +03:00
proller
42cb1540a1
Update ClientInfo.h
2018-04-16 23:12:44 +03:00
Nikolai Kochetov
9e05052c2a
merged with master
2018-04-16 18:35:11 +03:00
Nikolai Kochetov
7b8a306e34
minor fixes
2018-04-16 18:11:13 +03:00
proller
157067b127
CLICKHOUSE-3700: Fix empty password on replica query
2018-04-10 17:49:52 +03:00