Skip to content

Instantly share code, notes, and snippets.

View wendigo's full-sized avatar
🧭
Time isn't slowing, just speed, it's all we're knowing

Mateusz "Serafin" Gajewski wendigo

🧭
Time isn't slowing, just speed, it's all we're knowing
View GitHub Profile
@wendigo
wendigo / snappy_compress.java
Last active June 20, 2023 13:25
Java Foreign Linker + jextract
import java.lang.foreign.Arena;
import java.lang.foreign.MemorySegment;
import static io.airlift.slice.Preconditions.verify;
import static io.airlift.slice.snappy.snappy_c_h.SNAPPY_OK;
import static java.lang.foreign.ValueLayout.JAVA_CHAR;
import static java.lang.foreign.ValueLayout.JAVA_LONG;
public class SnappyTest
{
@wendigo
wendigo / InjectionTest.java
Last active January 4, 2024 16:03
Named Guice bindings
import com.google.common.base.MoreObjects;
import com.google.inject.Binder;
import com.google.inject.ConfigurationException;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import io.airlift.bootstrap.Bootstrap;
import io.airlift.configuration.AbstractConfigurationAwareModule;
@wendigo
wendigo / bug.java
Last active April 18, 2024 10:05
IntelliJ isEqualTo bug
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AssertProvider;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class SerafinTest
{
@Test
public void testIntelliJBug()
@wendigo
wendigo / TestClient.java
Created February 9, 2025 12:45
List all segments
/*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@wendigo
wendigo / TestSegmentClient.java
Created February 9, 2025 13:26
Reading all segments after query is finished
/*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@wendigo
wendigo / arrow.md
Last active February 9, 2025 20:13
Arrow vs JSON

Arrow uncompressed

Query finished in 3.063791375 s
Now reading data out of band
Data size is 15276072
Data size is 30550888
Data size is 30548648
Data size is 30550080
Data size is 30549344
Data size is 30549056
@wendigo
wendigo / TestSegmentClient.java
Last active February 21, 2025 10:50
Out-of-bound data retrieval using spooling protocol
/*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.