Skip to content

Instantly share code, notes, and snippets.

View chaudum's full-sized avatar
🏠
Working from home

Christian Haudum chaudum

🏠
Working from home
View GitHub Profile
crate [db859db60] > ./gradlew clean itest
:clean UP-TO-DATE
:admin-ui:clean UP-TO-DATE
:app:cleanDownloadPlugins UP-TO-DATE
:app:clean UP-TO-DATE
:azure-discovery:clean UP-TO-DATE
:blackbox:cleanBootstrap UP-TO-DATE
:blackbox:cleanDocs
:blackbox:clean UP-TO-DATE
:blob:clean UP-TO-DATE
package io.crate.sampleapp;
import java.sql.*;
import java.util.HashMap;
import java.util.Map;
public class ObjectArrayApplication {
public static void main(String[] args) {
# vi: set fileencoding=utf-8
# -*- coding: utf-8; -*-
import threading
import argparse
import time
def parse_args():
parser = argparse.ArgumentParser(description='')
/*
* Licensed to Crate under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership. Crate licenses this file
* to you under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@chaudum
chaudum / ltree.sql
Last active February 7, 2017 21:29
L-tree stucture with CrateDB
CREATE ANALYZER a1 (
TOKENIZER ltree WITH (
type = 'path_hierarchy',
delimiter = '.'
)
);
CREATE ANALYZER a2 (
TOKENIZER ltree WITH (
type = 'path_hierarchy',
/*
* Licensed to CRATE Technology GmbH ("Crate") under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Crate licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
curl -sXPUT "http://localhost:4200/_template/.partitioned.tto_device_data_points." -d@- <<- EOF
{
"order": 0,
"template": ".partitioned.tto_device_data_points.*",
"settings": {
"index": {
"number_of_shards": "2",
"auto_expand_replicas": "false",
"number_of_replicas": "1"
#!/usr/bin/env python3
"""Script to verify if a manual migration is required to upgrade from
CrateDB 0.57 to NEXT
`blobs.path` filesystem layout changes:
From
Exception:
SQLActionException[SQLParseException: line 1:14: no viable alternative at input 'col1']
Query:
SELECT ALL ( col1 * tab2.col0 + + CAST ( NULL AS REAL ) ) AS col2 FROM tab2
Exception:
Expected 1620 values, got 540
Query:
SELECT b6+285, a2*485, a5, a8+e2, d9, a3+e5
# vi: set fileencoding=utf-8
# -*- coding: utf-8; -*-
import os
import re
from pprint import pprint
import argparse
WHITELIST = [