Skip to content

Conversation

@Kukreti12
Copy link
Contributor

Overview

Fixes a TypeError in execute_sparql when SPARQL bindings contain NaN or non-dict values.
Adds a focused unit test to validate safe extraction of SPARQL binding values.
Changes

_neptune.py:
Update execute_sparql: safely extract cell values using a dict-type check; non-dict/NaN cells map to None.
Implementation: per-column Series.apply with _binding_value(d) to avoid type-checker issues with applymap.
test_neptune.py:
Add test_sparql_bindings_nan_safe with sanitized, non-sensitive dataset (single row).
Assert correct DataFrame shape (1, 5) and that missing checked_out maps to None.
Motivation

Prevents TypeError: argument of type 'float' is not iterable when bindings include NaN or missing values.
Validation

Unit test test_sparql_bindings_nan_safe passes locally: confirms null-safe behavior and correct value extraction.

@Kukreti12 Kukreti12 changed the title handled the null values in the dataframe fix: handled the null values in the dataframe Nov 27, 2025
@Kukreti12 Kukreti12 changed the title fix: handled the null values in the dataframe fix: handled the null values in the dataframe for existing issue: https://github.com/aws/aws-sdk-pandas/issues/2690 Nov 27, 2025
@Kukreti12 Kukreti12 changed the title fix: handled the null values in the dataframe for existing issue: https://github.com/aws/aws-sdk-pandas/issues/2690 fix: handled the null values in the dataframe for existing open issue-2690 Nov 27, 2025
@Kukreti12
Copy link
Contributor Author

Addressed the issue: #2690

@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: d4d890c
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: fa37151
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: d4d890c
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: fa37151
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@Kukreti12
Copy link
Contributor Author

Hello @jaidisido,
Could you please help identify where the gap or error might be? From the build logs, it appears that unit tests passed.

tests/unit/test_neptune.py::test_sparql_bindings_nan_safe 
[gw3] PASSED tests/unit/test_neptune.py::test_sparql_bindings_nan_safe 

@kukushking kukushking linked an issue Nov 28, 2025 that may be closed by this pull request
@kukushking
Copy link
Contributor

Thank you @Kukreti12 for chasing that bug down!

@kukushking kukushking merged commit ca5e8a6 into aws:main Nov 28, 2025
18 of 19 checks passed
@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: 75bb951
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: 75bb951
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse error running Neptune SPARQL query with null value

3 participants