-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add lineage query parser type configuration #24941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add lineage query parser config to select between different parser options in database lineage and dashboard metadata services
|
TypeScript types have been updated based on the JSON schema changes in the PR |
🛡️ TRIVY SCAN RESULT 🛡️ Target:
|
| Package | Vulnerability ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
libpng-dev |
CVE-2025-64720 | 🚨 HIGH | 1.6.39-2 | 1.6.39-2+deb12u1 |
libpng-dev |
CVE-2025-65018 | 🚨 HIGH | 1.6.39-2 | 1.6.39-2+deb12u1 |
libpng-dev |
CVE-2025-66293 | 🚨 HIGH | 1.6.39-2 | 1.6.39-2+deb12u1 |
libpng16-16 |
CVE-2025-64720 | 🚨 HIGH | 1.6.39-2 | 1.6.39-2+deb12u1 |
libpng16-16 |
CVE-2025-65018 | 🚨 HIGH | 1.6.39-2 | 1.6.39-2+deb12u1 |
libpng16-16 |
CVE-2025-66293 | 🚨 HIGH | 1.6.39-2 | 1.6.39-2+deb12u1 |
🛡️ TRIVY SCAN RESULT 🛡️
Target: Java
Vulnerabilities (33)
| Package | Vulnerability ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
com.fasterxml.jackson.core:jackson-core |
CVE-2025-52999 | 🚨 HIGH | 2.12.7 | 2.15.0 |
com.fasterxml.jackson.core:jackson-core |
CVE-2025-52999 | 🚨 HIGH | 2.13.4 | 2.15.0 |
com.fasterxml.jackson.core:jackson-databind |
CVE-2022-42003 | 🚨 HIGH | 2.12.7 | 2.12.7.1, 2.13.4.2 |
com.fasterxml.jackson.core:jackson-databind |
CVE-2022-42004 | 🚨 HIGH | 2.12.7 | 2.12.7.1, 2.13.4 |
com.google.code.gson:gson |
CVE-2022-25647 | 🚨 HIGH | 2.2.4 | 2.8.9 |
com.google.protobuf:protobuf-java |
CVE-2021-22569 | 🚨 HIGH | 3.3.0 | 3.16.1, 3.18.2, 3.19.2 |
com.google.protobuf:protobuf-java |
CVE-2022-3509 | 🚨 HIGH | 3.3.0 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2022-3510 | 🚨 HIGH | 3.3.0 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2024-7254 | 🚨 HIGH | 3.3.0 | 3.25.5, 4.27.5, 4.28.2 |
com.google.protobuf:protobuf-java |
CVE-2021-22569 | 🚨 HIGH | 3.7.1 | 3.16.1, 3.18.2, 3.19.2 |
com.google.protobuf:protobuf-java |
CVE-2022-3509 | 🚨 HIGH | 3.7.1 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2022-3510 | 🚨 HIGH | 3.7.1 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2024-7254 | 🚨 HIGH | 3.7.1 | 3.25.5, 4.27.5, 4.28.2 |
com.nimbusds:nimbus-jose-jwt |
CVE-2023-52428 | 🚨 HIGH | 9.8.1 | 9.37.2 |
com.squareup.okhttp3:okhttp |
CVE-2021-0341 | 🚨 HIGH | 3.12.12 | 4.9.2 |
commons-beanutils:commons-beanutils |
CVE-2025-48734 | 🚨 HIGH | 1.9.4 | 1.11.0 |
commons-io:commons-io |
CVE-2024-47554 | 🚨 HIGH | 2.8.0 | 2.14.0 |
dnsjava:dnsjava |
CVE-2024-25638 | 🚨 HIGH | 2.1.7 | 3.6.0 |
io.netty:netty-codec-http2 |
CVE-2025-55163 | 🚨 HIGH | 4.1.96.Final | 4.2.4.Final, 4.1.124.Final |
io.netty:netty-codec-http2 |
GHSA-xpw8-rcwv-8f8p | 🚨 HIGH | 4.1.96.Final | 4.1.100.Final |
io.netty:netty-handler |
CVE-2025-24970 | 🚨 HIGH | 4.1.96.Final | 4.1.118.Final |
net.minidev:json-smart |
CVE-2021-31684 | 🚨 HIGH | 1.3.2 | 1.3.3, 2.4.4 |
net.minidev:json-smart |
CVE-2023-1370 | 🚨 HIGH | 1.3.2 | 2.4.9 |
org.apache.avro:avro |
CVE-2024-47561 | 🔥 CRITICAL | 1.7.7 | 1.11.4 |
org.apache.avro:avro |
CVE-2023-39410 | 🚨 HIGH | 1.7.7 | 1.11.3 |
org.apache.derby:derby |
CVE-2022-46337 | 🔥 CRITICAL | 10.14.2.0 | 10.14.3, 10.15.2.1, 10.16.1.2, 10.17.1.0 |
org.apache.ivy:ivy |
CVE-2022-46751 | 🚨 HIGH | 2.5.1 | 2.5.2 |
org.apache.mesos:mesos |
CVE-2018-1330 | 🚨 HIGH | 1.4.3 | 1.6.0 |
org.apache.thrift:libthrift |
CVE-2019-0205 | 🚨 HIGH | 0.12.0 | 0.13.0 |
org.apache.thrift:libthrift |
CVE-2020-13949 | 🚨 HIGH | 0.12.0 | 0.14.0 |
org.apache.zookeeper:zookeeper |
CVE-2023-44981 | 🔥 CRITICAL | 3.6.3 | 3.7.2, 3.8.3, 3.9.1 |
org.eclipse.jetty:jetty-server |
CVE-2024-13009 | 🚨 HIGH | 9.4.56.v20240826 | 9.4.57.v20241219 |
org.lz4:lz4-java |
CVE-2025-12183 | 🚨 HIGH | 1.8.0 | 1.8.1 |
🛡️ TRIVY SCAN RESULT 🛡️
Target: Node.js
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: Python
Vulnerabilities (3)
| Package | Vulnerability ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
starlette |
CVE-2025-62727 | 🚨 HIGH | 0.48.0 | 0.49.1 |
urllib3 |
CVE-2025-66418 | 🚨 HIGH | 1.26.20 | 2.6.0 |
urllib3 |
CVE-2025-66471 | 🚨 HIGH | 1.26.20 | 2.6.0 |
🛡️ TRIVY SCAN RESULT 🛡️
Target: /etc/ssl/private/ssl-cert-snakeoil.key
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/extended_sample_data.yaml
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/lineage.yaml
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/sample_data.json
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/sample_data.yaml
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/sample_data_aut.yaml
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/sample_usage.json
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/sample_usage.yaml
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /ingestion/pipelines/sample_usage_aut.yaml
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️ Target:
|
| Package | Vulnerability ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
com.fasterxml.jackson.core:jackson-core |
CVE-2025-52999 | 🚨 HIGH | 2.12.7 | 2.15.0 |
com.fasterxml.jackson.core:jackson-core |
CVE-2025-52999 | 🚨 HIGH | 2.13.4 | 2.15.0 |
com.fasterxml.jackson.core:jackson-databind |
CVE-2022-42003 | 🚨 HIGH | 2.12.7 | 2.12.7.1, 2.13.4.2 |
com.fasterxml.jackson.core:jackson-databind |
CVE-2022-42004 | 🚨 HIGH | 2.12.7 | 2.12.7.1, 2.13.4 |
com.google.code.gson:gson |
CVE-2022-25647 | 🚨 HIGH | 2.2.4 | 2.8.9 |
com.google.protobuf:protobuf-java |
CVE-2021-22569 | 🚨 HIGH | 3.3.0 | 3.16.1, 3.18.2, 3.19.2 |
com.google.protobuf:protobuf-java |
CVE-2022-3509 | 🚨 HIGH | 3.3.0 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2022-3510 | 🚨 HIGH | 3.3.0 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2024-7254 | 🚨 HIGH | 3.3.0 | 3.25.5, 4.27.5, 4.28.2 |
com.google.protobuf:protobuf-java |
CVE-2021-22569 | 🚨 HIGH | 3.7.1 | 3.16.1, 3.18.2, 3.19.2 |
com.google.protobuf:protobuf-java |
CVE-2022-3509 | 🚨 HIGH | 3.7.1 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2022-3510 | 🚨 HIGH | 3.7.1 | 3.16.3, 3.19.6, 3.20.3, 3.21.7 |
com.google.protobuf:protobuf-java |
CVE-2024-7254 | 🚨 HIGH | 3.7.1 | 3.25.5, 4.27.5, 4.28.2 |
com.nimbusds:nimbus-jose-jwt |
CVE-2023-52428 | 🚨 HIGH | 9.8.1 | 9.37.2 |
com.squareup.okhttp3:okhttp |
CVE-2021-0341 | 🚨 HIGH | 3.12.12 | 4.9.2 |
commons-beanutils:commons-beanutils |
CVE-2025-48734 | 🚨 HIGH | 1.9.4 | 1.11.0 |
commons-io:commons-io |
CVE-2024-47554 | 🚨 HIGH | 2.8.0 | 2.14.0 |
dnsjava:dnsjava |
CVE-2024-25638 | 🚨 HIGH | 2.1.7 | 3.6.0 |
io.netty:netty-codec-http2 |
CVE-2025-55163 | 🚨 HIGH | 4.1.96.Final | 4.2.4.Final, 4.1.124.Final |
io.netty:netty-codec-http2 |
GHSA-xpw8-rcwv-8f8p | 🚨 HIGH | 4.1.96.Final | 4.1.100.Final |
io.netty:netty-handler |
CVE-2025-24970 | 🚨 HIGH | 4.1.96.Final | 4.1.118.Final |
net.minidev:json-smart |
CVE-2021-31684 | 🚨 HIGH | 1.3.2 | 1.3.3, 2.4.4 |
net.minidev:json-smart |
CVE-2023-1370 | 🚨 HIGH | 1.3.2 | 2.4.9 |
org.apache.avro:avro |
CVE-2024-47561 | 🔥 CRITICAL | 1.7.7 | 1.11.4 |
org.apache.avro:avro |
CVE-2023-39410 | 🚨 HIGH | 1.7.7 | 1.11.3 |
org.apache.derby:derby |
CVE-2022-46337 | 🔥 CRITICAL | 10.14.2.0 | 10.14.3, 10.15.2.1, 10.16.1.2, 10.17.1.0 |
org.apache.ivy:ivy |
CVE-2022-46751 | 🚨 HIGH | 2.5.1 | 2.5.2 |
org.apache.mesos:mesos |
CVE-2018-1330 | 🚨 HIGH | 1.4.3 | 1.6.0 |
org.apache.thrift:libthrift |
CVE-2019-0205 | 🚨 HIGH | 0.12.0 | 0.13.0 |
org.apache.thrift:libthrift |
CVE-2020-13949 | 🚨 HIGH | 0.12.0 | 0.14.0 |
org.apache.zookeeper:zookeeper |
CVE-2023-44981 | 🔥 CRITICAL | 3.6.3 | 3.7.2, 3.8.3, 3.9.1 |
org.eclipse.jetty:jetty-server |
CVE-2024-13009 | 🚨 HIGH | 9.4.56.v20240826 | 9.4.57.v20241219 |
org.lz4:lz4-java |
CVE-2025-12183 | 🚨 HIGH | 1.8.0 | 1.8.1 |
🛡️ TRIVY SCAN RESULT 🛡️
Target: Node.js
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: Python
Vulnerabilities (6)
| Package | Vulnerability ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
Werkzeug |
CVE-2024-34069 | 🚨 HIGH | 2.2.3 | 3.0.3 |
deepdiff |
CVE-2025-58367 | 🔥 CRITICAL | 7.0.1 | 8.6.1 |
ray |
CVE-2025-62593 | 🔥 CRITICAL | 2.47.1 | 2.52.0 |
starlette |
CVE-2025-62727 | 🚨 HIGH | 0.48.0 | 0.49.1 |
urllib3 |
CVE-2025-66418 | 🚨 HIGH | 1.26.20 | 2.6.0 |
urllib3 |
CVE-2025-66471 | 🚨 HIGH | 1.26.20 | 2.6.0 |
🛡️ TRIVY SCAN RESULT 🛡️
Target: /etc/ssl/private/ssl-cert-snakeoil.key
No Vulnerabilities Found
🛡️ TRIVY SCAN RESULT 🛡️
Target: /home/airflow/openmetadata-airflow-apis/openmetadata_managed_apis.egg-info/PKG-INFO
No Vulnerabilities Found
… add auto as default parser option
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
| "Auto", | ||
| "SqlGlot", | ||
| "SqlFluff", | ||
| "SqlParse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohittilala lets remove sqlparse as selectable parser, it should only be used when all else fails
| "properties": { | ||
| "type": { | ||
| "title": "Query Parser Type", | ||
| "description": "Choose the SQL parser for lineage extraction:\n• Auto (default): Automatically tries SqlGlot first, falls back to SqlFluff, then SqlParse. Recommended for best results.\n• SqlGlot: High-performance parser with excellent dialect support. Falls back to SqlParse on failure.\n• SqlFluff: Comprehensive parser with strong dialect support. Falls back to SqlParse on failure.\n• SqlParse: Generic ANSI SQL parser with limited dialect support. No fallback.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the options be sqlglot -> sqlfluff -> sqlparser? instead of sqlglot -> sqlparser?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds configuration support for selecting different SQL query parsers (SqlGlot, SqlFluff, SqlParse, or Auto) for lineage extraction in database and dashboard metadata ingestion workflows. Additionally, it improves the UI's ServiceDocPanel to support both complete field name paths and parameter-only names for focus/scroll functionality when form inputs are selected.
Key Changes
- Query Parser Configuration: Introduces a new
QueryParserConfigschema with aQueryParserTypeenum (Auto, SqlGlot, SqlFluff, SqlParse) that can be configured in database lineage and dashboard metadata pipelines to control which SQL parser is used for lineage extraction - Ingestion Framework Updates: Threads the
parser_typeparameter through all lineage processing paths (database services, dashboard services, stored procedures, views, and queries) to respect the configured parser type - UI Field Name Handling: Refactors ServiceDocPanel to try both complete field names (with full path) and simple parameter names when locating elements for highlighting and scrolling, solving issues where parameters share names but have different parent paths
Reviewed changes
Copilot reviewed 35 out of 41 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
openmetadata-spec/src/main/resources/json/schema/metadataIngestion/parserconfig/queryParserConfig.json |
New JSON schema defining QueryParserConfig with QueryParserType enum for lineage parser selection |
openmetadata-spec/src/main/resources/json/schema/metadataIngestion/databaseServiceQueryLineagePipeline.json |
Adds queryParserConfig property to database lineage pipeline configuration |
openmetadata-spec/src/main/resources/json/schema/metadataIngestion/dashboardServiceMetadataPipeline.json |
Adds queryParserConfig property to dashboard metadata pipeline configuration |
openmetadata-ui/src/main/resources/ui/src/generated/**/*.ts |
Auto-generated TypeScript types from JSON schemas including QueryParserConfig and QueryParserType |
openmetadata-ui/src/main/resources/ui/src/utils/ServiceUtils.tsx |
Renames getActiveFieldNameForAppDocs to getCompleteActiveFieldName for clarity |
openmetadata-ui/src/main/resources/ui/src/utils/ServiceUtils.test.ts |
Updates tests to use renamed function |
openmetadata-ui/src/main/resources/ui/src/components/common/ServiceDocPanel/ServiceDocPanel.tsx |
Implements fallback logic to try complete field name first, then parameter name for element selection |
openmetadata-ui/src/main/resources/ui/src/components/common/ServiceDocPanel/ServiceDocPanel.test.tsx |
Updates tests for renamed function and new fallback behavior |
openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/workflows/lineage.md |
Adds documentation for Query Parser Type configuration option |
openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/workflows/metadata.md |
Adds documentation for Query Parser Type configuration option |
ingestion/src/metadata/ingestion/lineage/parser.py |
Adds parser_type parameter to LineageParser and implements conditional parser selection based on type |
ingestion/src/metadata/ingestion/lineage/sql_lineage.py |
Threads parser_type parameter through get_lineage_by_query and get_lineage_via_table_entity functions |
ingestion/src/metadata/utils/db_utils.py |
Adds parser_type parameter to get_view_lineage function |
ingestion/src/metadata/ingestion/source/database/query_parser_source.py |
Adds get_query_parser_type method to retrieve parser config from source config |
ingestion/src/metadata/ingestion/source/database/lineage_source.py |
Passes parser_type from config to lineage processors |
ingestion/src/metadata/ingestion/source/database/stored_procedures_mixin.py |
Passes parser_type from config to procedure lineage processor |
ingestion/src/metadata/ingestion/source/database/lineage_processors.py |
Adds parser_type parameter to all lineage processor functions |
ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py |
Adds get_query_parser_type method for dashboard services |
ingestion/src/metadata/ingestion/source/dashboard/*/metadata.py |
Updates all dashboard connectors (Tableau, Superset, Redash, PowerBI, Quicksight, Mode, Metabase, Microstrategy, Looker, Hex, Grafana) to use parser_type from config |
ingestion/src/metadata/ingestion/source/dashboard/powerbi/databricks_parser.py |
Adds parser_type parameter to parse_databricks_native_query_source function |
ingestion/src/metadata/ingestion/processor/query_parser.py |
Adds parser_type parameter to parse_sql_statement function |
ingestion/src/metadata/cli/lineage.py |
Adds parserType field to LineageWorkflow config model |
ingestion/tests/unit/**/*.py |
Updates all unit tests to pass QueryParserType.Auto parameter where required |
| def get_query_parser_type(self) -> Optional[QueryParserType]: | ||
| """ | ||
| Get the query parser type from config. | ||
| Returns Auto as default if not specified. | ||
| """ | ||
| return ( | ||
| self.source_config.queryParserConfig.type | ||
| if self.source_config.queryParserConfig | ||
| else None | ||
| ) |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the query_parser_source, this method returns Optional[QueryParserType] which can be None. However, when None is passed to LineageParser or other functions expecting QueryParserType, it will cause a TypeError. Consider returning QueryParserType.Auto instead of None when queryParserConfig is not set.
| def get_query_parser_type(self) -> Optional[QueryParserType]: | |
| """ | |
| Get the query parser type from config. | |
| Returns Auto as default if not specified. | |
| """ | |
| return ( | |
| self.source_config.queryParserConfig.type | |
| if self.source_config.queryParserConfig | |
| else None | |
| ) | |
| def get_query_parser_type(self) -> QueryParserType: | |
| """ | |
| Get the query parser type from config. | |
| Returns Auto as default if not specified. | |
| """ | |
| if ( | |
| getattr(self.source_config, "queryParserConfig", None) | |
| and getattr(self.source_config.queryParserConfig, "type", None) is not None | |
| ): | |
| return self.source_config.queryParserConfig.type | |
| return QueryParserType.Auto |
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| } catch (error) { |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The eslint-disable comment for unused-vars is unnecessary here. The error variable is intentionally not used in the catch block as per the design (errors are handled by setting markdownContent to empty string). If you want to suppress the warning, consider using an underscore prefix for the parameter name instead of a disable comment.
| return ( | ||
| self.source_config.queryParserConfig.type | ||
| if self.source_config.queryParserConfig | ||
| else None |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation comment states "Returns Auto as default if not specified" but the method actually returns None. Either update the documentation to match the implementation, or change the implementation to return QueryParserType.Auto when queryParserConfig is not set (which would fix the related bug).
| else None | |
| and self.source_config.queryParserConfig.type | |
| else QueryParserType.Auto |
| def get_query_parser_type(self) -> Optional[QueryParserType]: | ||
| """ | ||
| Get the query parser type from source config. | ||
| Returns None to use default Auto parser type. | ||
| """ | ||
| if ( | ||
| hasattr(self.source_config, "queryParserConfig") | ||
| and self.source_config.queryParserConfig | ||
| ): | ||
| return self.source_config.queryParserConfig.type | ||
| return None |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation comment states "Returns None to use default Auto parser type" but this is misleading. When None is passed explicitly as a parameter to functions, it overrides their default values. The code would be clearer and more robust if this method returned QueryParserType.Auto instead of None when queryParserConfig is not set.
| def get_query_parser_type(self) -> Optional[QueryParserType]: | |
| """ | |
| Get the query parser type from source config. | |
| Returns None to use default Auto parser type. | |
| """ | |
| if ( | |
| hasattr(self.source_config, "queryParserConfig") | |
| and self.source_config.queryParserConfig | |
| ): | |
| return self.source_config.queryParserConfig.type | |
| return None | |
| def get_query_parser_type(self) -> QueryParserType: | |
| """ | |
| Get the query parser type from source config. | |
| Returns the configured parser type, or QueryParserType.Auto when not set. | |
| """ | |
| if ( | |
| hasattr(self.source_config, "queryParserConfig") | |
| and self.source_config.queryParserConfig | |
| ): | |
| return self.source_config.queryParserConfig.type | |
| return QueryParserType.Auto |
| def get_query_parser_type(self) -> Optional[QueryParserType]: | ||
| """ | ||
| Get the query parser type from source config. | ||
| Returns None to use default Auto parser type. | ||
| """ | ||
| if ( | ||
| hasattr(self.source_config, "queryParserConfig") | ||
| and self.source_config.queryParserConfig | ||
| ): | ||
| return self.source_config.queryParserConfig.type | ||
| return None |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The get_query_parser_type method returns Optional[QueryParserType] which can be None, but the LineageParser expects QueryParserType.Auto as the default. When this method returns None, it will cause a TypeError when the parser_type is used in comparisons within LineageParser. Consider returning QueryParserType.Auto instead of None when queryParserConfig is not set.
| def get_query_parser_type(self) -> Optional[QueryParserType]: | |
| """ | |
| Get the query parser type from source config. | |
| Returns None to use default Auto parser type. | |
| """ | |
| if ( | |
| hasattr(self.source_config, "queryParserConfig") | |
| and self.source_config.queryParserConfig | |
| ): | |
| return self.source_config.queryParserConfig.type | |
| return None | |
| def get_query_parser_type(self) -> QueryParserType: | |
| """ | |
| Get the query parser type from source config. | |
| Returns QueryParserType.Auto if queryParserConfig is not set. | |
| """ | |
| if ( | |
| hasattr(self.source_config, "queryParserConfig") | |
| and self.source_config.queryParserConfig | |
| ): | |
| return self.source_config.queryParserConfig.type | |
| return QueryParserType.Auto |
| import time | ||
| import traceback | ||
| from typing import Iterable, List, Union | ||
| from typing import Iterable, List, Optional, Union |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'Optional' is not used.
| from typing import Iterable, List, Optional, Union | |
| from typing import Iterable, List, Union |



Describe your changes:
Ingestion Changes:
UI Changes:
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>