This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.pinot.custom.function; | |
import com.github.davidmoten.geo.GeoHash; | |
import org.apache.pinot.spi.annotations.ScalarFunction; | |
public class CustomScalarFunctions { | |
@ScalarFunction(names = {"encode_geohash"}) | |
public static String latLngToGeo(Double latitude, Double longitude, Integer geoLength) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tableName":"calcs", | |
"segmentsConfig":{ | |
"segmentAssignmentStrategy":"BalanceNumSegmentAssignmentStrategy", | |
"segmentPushType":"APPEND", | |
"schemaName":"calcs", | |
"replication":1 | |
}, | |
"tableIndexConfig":{ | |
"invertedIndexColumns":[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Instant; | |
import java.time.LocalDateTime; | |
import java.time.ZoneId; | |
import java.util.concurrent.ThreadLocalRandom; | |
import java.util.concurrent.TimeUnit; | |
import org.joda.time.format.DateTimeFormat; | |
import org.joda.time.format.DateTimeFormatter; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.CompilerControl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generate red-black tree from a list | |
void generateRedBlackTree(){ | |
// create a red-black tree | |
// for each node in the list | |
// insert the node into the tree | |
RedBlackTree tree = new RedBlackTree(); | |
for(Node node : list){ | |
tree.insert(node); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tableName": "pullRequestMergedEvents", | |
"tableType": "REALTIME", | |
"segmentsConfig": { | |
"timeColumnName": "mergedTimeMillis", | |
"retentionTimeUnit": "DAYS", | |
"retentionTimeValue": "60", | |
"schemaName": "pullRequestMergedEvents", | |
"replication": "1", | |
"replicasPerPartition": "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schemaName": "pullRequestMergedEvents", | |
"dimensionFieldSpecs": [ | |
{ | |
"name": "title", | |
"dataType": "STRING", | |
"defaultNullValue": "" | |
}, | |
{ | |
"name": "labels", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -P ~/Library/Tableau/Drivers/Pinot/ https://repo1.maven.org/maven2/org/apache/pinot/pinot-jdbc-client/0.8.0/pinot-jdbc-client-0.8.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from java_integration_lib import find_modules | |
import subprocess | |
def foo_bar(): | |
jar_path = find_modules._find_dummy_java_module() | |
output = subprocess.check_output(["java", "-cp", jar_path, "org.example.Main"]) | |
print(str(output)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("Java " + Main.class.toString() + " executed!!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from future import standard_library | |
standard_library.install_aliases() | |
from builtins import * | |
from shutil import copytree, copy, rmtree | |
from setuptools import setup | |
import os | |
import sys | |
from distutils.command.build_ext import build_ext | |
import glob | |
from setuptools.command.install import install |
NewerOlder