Skip to content

Incorrect behaviour of File-based Session Property Manager #25965

@imjalpreet

Description

@imjalpreet

File-based session property manager throws a null pointer exception if no catalog session property is provided in any JSON entry

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "map" is null
at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:688)
at com.facebook.presto.session.SessionMatchSpec.<init>(SessionMatchSpec.java:74)
...

Your Environment

  • Presto version used: 0.295-SNAPSHOT
  • Storage (HDFS/S3/GCS..): N.A
  • Data source and connector used: N.A.
  • Deployment (Cloud or On-prem): N.A.

Expected Behavior

Presto should allow one of the sessionProperties or catalogSessionProperties arguments to be null

Current Behavior

If catalogSessionProperties is null and sessionProperties is non-null:

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "map" is null
at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:688)
at com.facebook.presto.session.SessionMatchSpec.<init>(SessionMatchSpec.java:74)
...

If sessionProperties is null and catalogSessionProperties is non-null:

java.lang.IllegalArgumentException: sessionProperties is null

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 Unprioritized

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions