Skip to content

Instantly share code, notes, and snippets.

View vibhatha's full-sized avatar
:atom:
Mostly Opensource

Vibhatha Lakmal Abeykoon vibhatha

:atom:
Mostly Opensource
View GitHub Profile

Lanka Data Foundation.

Contributor License Agreement ("Contribution Agreement")

Thank you for your interest in the open source products made available by Lanka Data Foundation (“LDF”). In order to clarify the intellectual property license granted with Contributions by each person or entity, LDF must have a Contributor Agreement on file that has been accepted by each Contributor, indicating agreement to the license terms below. This Contribution Agreement is for your protection as a Contributor as well as the protection of LDF; it does not change your rights to use your own Contributions for any other purpose. This version of the Contributor Agreement allows You to submit Contributions to LDF, and to grant copyright and patent licenses thereto.

You accept and agree to the following terms and conditions for Your past, present and future Contributions submitted to LDF. In return, LDF may use Your Contributions in its products. Except for the license granted herein to LDF, You reserve all right, title, an

@vibhatha
vibhatha / t1_substrait_plan.txt
Created June 1, 2023 13:40
Sample substrait plan
extension_uris {
  extension_uri_anchor: 1
  uri: "https://github.com/substrait-io/substrait/blob/main/extensions/functions_boolean.yaml"
}
extension_uris {
  extension_uri_anchor: 2
  uri: "https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml"
}
extensions {
  extension_function {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vibhatha
vibhatha / sample_arrow_table.cc
Created March 7, 2023 15:09
Sample An Arrow Table Example
#include <arrow/api.h>
#include <arrow/compute/api.h>
#include <iostream>
#include <random>
template <typename TYPE,
typename = typename std::enable_if<arrow::is_number_type<TYPE>::value |
arrow::is_boolean_type<TYPE>::value |
arrow::is_temporal_type<TYPE>::value>::type>
arrow::Result<std::shared_ptr<arrow::Array>> GetArrayDataSample(
"""
Version 4
---------
Install Libraries
-----------------
On Mac M1
----------
pip install ibis ibis-substrait pyarrow duckdb-engine
@vibhatha
vibhatha / generate_compute_agg_queries.py
Last active March 2, 2023 16:29
Generate Substrait Queries with Ibis for Compute Aggregate
"""
Version 4
---------
Install Libraries
-----------------
On Mac M1
----------
pip install ibis ibis-substrait pyarrow duckdb-engine
@vibhatha
vibhatha / generate_substrait_projections_with_names_v2.py
Created January 20, 2023 05:19
Generate Substrait Plans in Google Proto Text Format
"""
Version 3
---------
Update to naming used for projection
Function Performed
------------------
Generate Substrait Plans and Corresponding SQL via Ibis
"""
Version 2
---------
Update to naming used for projection
Function Performed
------------------
Generate Substrait Plans and Corresponding SQL via Ibis
@vibhatha
vibhatha / generate_substrait_projections.py
Last active January 19, 2023 09:12
Generate Substrait Projections with Ibis
"""
Generate Substrait Plans and Corresponding SQL via Ibis
Requirements
------------
pip install ibis ibis-substrait pyarrow
Run Script
----------
python generate_substrait_projections.py <path-to-save-directory>
# Doxyfile 1.8.17
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "PyVelox"
PROJECT_NUMBER =
PROJECT_BRIEF =
PROJECT_LOGO =