Skip to content

tanejagagan/sql-commons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sql-Commons

It's a collection of functions for interacting with DuckDB

Requirement

  • java 17
  • maven

Compile project

./mvnw compile

Connection pooling

Start using DuckDB with

  • Execute the query. ConnectionPool.execute(sql)
  • Print the results. ConnectionPool.printResult(sql)
  • Get Arrow reader for Reading. ConnectionPool.getReader(sql)
  • It loads the connection property from duckdb.properties inside resources directory

Transformation

  • Read the sql tree with Transformation.parseToTree(sql)
  • Various transformation change the query. Used for fingerprinting algorithms

Fingerprinting

Replace all the literals from the where clause of a query and hash the query. Read more about it at https://medium.com/@tanejagagan/ac5e00cb96b5

  • ./mvnw exec:java -Dexec.mainClass="io.github.tanejagagan.sql.commons.Fingerprint"

Delta Lake partition pruning

  • ./mvnw exec:java -Dexec.mainClass="io.github.tanejagagan.sql.commons.delta.PartitionPruning"

Hive partition pruning

./mvnw exec:java -Dexec.mainClass="io.github.tanejagagan.sql.commons.hive.HivePartitionPruning"

TODO Iceberg partition pruning

Publish the project

  • export GPG_TTY=$(tty)
  • ./mvnw clean -P release-sign-artifacts -DskipTests deploy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages