{"id":4545,"library":"fugue-sql-antlr","title":"Fugue SQL Antlr Parser","description":"Fugue SQL Antlr Parser is an internal dependency of the Fugue project, providing the ANTLR4-based parsing capabilities for FugueSQL. It is not intended for direct use by end-users but is crucial for the SQL functionality within the Fugue ecosystem. The library has its own versioning, distinct from the main `fugue` package, with the current version being 0.2.4.","status":"active","version":"0.2.4","language":"en","source_language":"en","source_url":"https://github.com/fugue-project/fugue-sql-antlr","tags":["parser","sql","antlr","fugue","internal"],"install":[{"cmd":"pip install fugue-sql-antlr","lang":"bash","label":"Direct Installation (internal use only)"},{"cmd":"pip install fugue[sql]","lang":"bash","label":"Recommended (as part of Fugue SQL)"},{"cmd":"pip install fugue[sql,cpp_sql_parser]","lang":"bash","label":"Recommended (with C++ parser for performance)"}],"dependencies":[{"reason":"fugue-sql-antlr is an internal dependency of the Fugue project, providing SQL parsing for FugueSQL.","package":"fugue","optional":false},{"reason":"Core dependency for the ANTLR4-based parser.","package":"antlr4-python3-runtime","optional":false},{"reason":"Optional C++ implementation of the parser for significantly faster parsing (~25x faster). Requires C++ compiler.","package":"fugue-sql-antlr-cpp","optional":true}],"imports":[{"note":"Users typically interact with FugueSQL through the `fsql` function from the `fugue_sql` module, which implicitly uses `fugue-sql-antlr`.","symbol":"FugueSQL","correct":"from fugue_sql import fsql"}],"quickstart":{"code":"import pandas as pd\nfrom fugue_sql import fsql\n\ndf = pd.DataFrame({\"id\": [1, 2, 3], \"value\": [10, 20, 30]})\n\n# FugueSQL uses the fugue-sql-antlr parser internally\nresult_df = fsql(\"SELECT id, value * 2 AS doubled_value FROM df WHERE value > 15\").run(df).as_pandas()\n\nprint(result_df)","lang":"python","description":"This quickstart demonstrates how Fugue-SQL is used, which in turn utilizes the `fugue-sql-antlr` parser internally. Users typically do not directly import or interact with `fugue-sql-antlr` itself, but rather use the `fsql` function from the main `fugue` project to execute SQL queries on various backends."},"warnings":[{"fix":"Always interact with Fugue SQL functionality through the `fugue` library's public API, such as `from fugue_sql import fsql`.","message":"The `fugue-sql-antlr` package is an internal component of the Fugue project and is not designed for direct user interaction. Attempting to directly import or use its classes can lead to unexpected behavior or breakage with future updates.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `fugue` is installed with the `sql` extra: `pip install fugue[sql]`.","message":"Prior to `fugue` version 0.9.0, `fugue-sql-antlr` was included as a core dependency of the main `fugue` package. From `fugue` 0.9.0 onwards, it was moved to the `sql` extra. Users who previously relied on Fugue SQL without specifying the extra might find it missing after upgrading `fugue`.","severity":"breaking","affected_versions":"fugue < 0.9.0 upgrading to fugue >= 0.9.0"},{"fix":"Install with `pip install fugue-sql-antlr-cpp` alongside `fugue[sql]`, or use `pip install fugue[sql,cpp_sql_parser]` to get the C++ parser.","message":"For performance-critical Fugue SQL parsing, the optional `fugue-sql-antlr-cpp` package is highly recommended as it can be significantly faster. However, its installation may require a C++ compiler on the system.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}