Skip to main content

Module trie

Module trie 

Source
Expand description

Trie data structure for efficient prefix matching

This module provides a trie implementation used for:

  • Efficient keyword matching in the tokenizer
  • Time format conversion with overlapping patterns
  • Schema table name resolution

Based on the Python implementation in sqlglot/trie.py.

Structs§

Trie
A trie (prefix tree) data structure

Enums§

TrieResult
Result of searching for a key in a trie

Functions§

new_trie
Create a new trie from an iterator of (key, value) pairs
new_trie_from_keys
Create a new trie from an iterator of keys (values are unit type)