Skip to content

truffle-arrow-language is a language processing for Apache Arrow(https://arrow.apache.org) and built using Truffle for GraalVM.

License

Notifications You must be signed in to change notification settings

masayuki038/truffle-arrow-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

truffle-arrow-language

truffle-arrow-language is a language processing for Apache Arrow and built using Truffle for GraalVM.

Purpose

truffle-arrow-language is developed as a language for a code generation by a query engine.

Sample Code

This is a sample code for filter-aggregation.

$map = {}; // for aggregation
$out = arrays([key:INT, value:INT]); // for output
load ("target/all_fields.arrow") {
  // Allow to reference the field value (F_INT) directly in loop
  if ($F_INT < 5) { // filter
    $map[$F_INT] = get($map[$F_INT], 0) + 1; // aggregation
  }
}
store($out, $map); // storing the result as RecordBatch(VectorSchemaRoot)
return $out;

Referenced

About

truffle-arrow-language is a language processing for Apache Arrow(https://arrow.apache.org) and built using Truffle for GraalVM.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages