- Newest
- Most votes
- Most comments
Based on the error you're encountering, this appears to be a known issue with the Athena Neptune connector's query passthrough functionality. The NullPointerException in doGetQueryPassthroughSchema indicates a bug in how the connector handles schema inference for passthrough queries.
Here are the key points about this issue:
Root Cause:
The Neptune connector's passthrough query feature attempts to infer the schema by executing a sample query against Neptune, but the schema inference logic has a defect that causes it to fail with a NullPointerException. This is specifically a problem in the doGetQueryPassthroughSchema method where it tries to determine the output schema for your Gremlin query.
Known Workarounds:
-
Use explicit schema definition: Instead of relying on automatic schema inference, you may need to define the expected output schema explicitly in your Glue catalog or through connector configuration, though this limits the flexibility of passthrough queries.
-
Modify the Gremlin query structure: Some users have found success by adjusting their Gremlin queries to return results in a more structured format that the connector can parse. However, given that even minimal queries fail in your case, this may not resolve the issue.
-
Check connector version: Ensure you're using the latest version of the Athena Neptune connector. This bug may have been addressed in newer releases. You can update the connector Lambda function to use the latest available version.
-
File a bug report: If you're using the latest version and still encountering this issue, this appears to be a legitimate bug that should be reported through AWS Support or the AWS GitHub repository for Athena connectors.
Regarding your specific questions:
- Yes, this appears to be a known defect in the connector's passthrough implementation
- The issue is not with your
valueMap()usage but with the connector's schema inference mechanism itself - The most reliable workaround is to use standard federated queries (which you've confirmed work) rather than passthrough queries until this bug is resolved
- This is indeed a bug in the connector code rather than a configuration issue on your end
Since your regular federated queries work correctly, you may want to continue using that approach while waiting for a fix to the passthrough functionality.

Update
I performed an additional test after updating the Athena Neptune connector image.
Connector version update
The Lambda was originally running this image:
I updated it to:
Result after update
The problem still occurs.
Passthrough is still recognized and enabled, but the request fails in the same place as before, with a
NullPointerExceptionin:Additional log details
After the image update, I observed:
SYSTEM.QUERYis still recognizedNullPointerExceptionstill occurs during passthrough schema resolutionRelevant log excerpt after the update: