Skip to content

Instantly share code, notes, and snippets.

View iamaleksey's full-sized avatar

Aleksey Yeschenko iamaleksey

View GitHub Profile
(defcfg
input (iokit-name "Apple Internal Keyboard / Trackpad")
output (kext)
fallthrough true
)
(defalias
ctl_a (tap-hold-next-release 175 a lctl)
alt_s (tap-hold-next-release 175 s lalt)
met_d (tap-hold-next-release 175 d lmet)
/* QWERTY
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |LShift| Z | X | C | V | B | N | M | , | . | / |RShift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
/* Lower
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | 4 | 2 | 3 | 1 | 5 | 6 | 0 | 8 | 9 | 7 | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | $ | + | ( | ) | @ | | | - | = | _ | * | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | ! | # | { | } | ~ | & | [ | ] | % | ^ | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
cqlsh> create table test.test (a int, b int, c int, d int static, primary key (a, b)) with clustering order by (b DESC);
cqlsh> insert into test.test (a, b, c) values (1, 1, 1);
cqlsh> insert into test.test (a, b, c) values (1, 2, 2);
cqlsh> insert into test.test (a, b, c) values (1, 3, 3);
cqlsh> select * from test.test where a = 1 order by b DESC;
a | b | d | c
---+---+------+---
1 | 3 | null | 3
1 | 2 | null | 2
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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
package org.apache.cassandra.cql3.statements.schema;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import org.apache.cassandra.cql3.CQL3Type;
import org.apache.cassandra.cql3.ColumnIdentifier;
import org.apache.cassandra.cql3.statements.TableAttributes;
import org.apache.cassandra.db.Keyspace;
@iamaleksey
iamaleksey / gist:587c34fbf90eff76405fb1eed3314ad4
Created August 22, 2016 13:18
more schema bullshit (or not)
CREATE TABLE "Keyspace1"."Standard3" (
key blob PRIMARY KEY,
"6331" ascii,
"6332" ascii
) WITH COMPACT STORAGE;
cqlsh> select * from system.schema_columnfamilies where keyspace_name = 'Keyspace1' and columnfamily_name = 'Standard3';
@ Row 1
diff --git a/src/java/org/apache/cassandra/db/CompactTables.java b/src/java/org/apache/cassandra/db/CompactTables.java
index a73b865..e31fda3 100644
--- a/src/java/org/apache/cassandra/db/CompactTables.java
+++ b/src/java/org/apache/cassandra/db/CompactTables.java
@@ -93,13 +93,10 @@ public abstract class CompactTables
public static AbstractType<?> columnDefinitionComparator(String kind, boolean isSuper, AbstractType<?> rawComparator, AbstractType<?> rawSubComparator)
{
- if ("compact_value".equals(kind))
+ if (!"regular".equals(kind))
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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