Python DSE Execution Profile And Graph Option

Description

Snippet from https://github.com/datastax/python-dse-graph/blob/master/dse_graph/__init__.py

The bytecode-json will cause problem, if i want to run schema commands.
InvalidRequest: Error from server: code=2200 [Invalid query] message="Unrecognized token

'schema': was expecting ('true', 'false' or 'null')
at [Source: schema.config().option('graph.schema_mode').set('Development'); line: 1, column: 7]"

After some investigation:

>>> ep = GraphExecutionProfile(graph_options=GraphOptions(graph_name=graph_name))
>>> vars(ep)
{'load_balancing_policy': <dse.policies.TokenAwarePolicy object at 0x7fe8860964d0>, 'request_timeout': 30.0, 'consistency_level': 10, 'continuous_paging_options': None, 'retry_policy': <dse.policies.NeverRetryPolicy object at 0x7fe8860e3990>, 'graph_options': <dse.graph.query.GraphOptions object at 0x7fe88b8627d0>, 'serial_consistency_level': None, 'row_factory': <function graph_object_row_factory at 0x7fe886b73cf8>, 'speculative_execution_policy': <dse.policies.NoSpeculativeExecutionPolicy object at 0x7fe886096590>}
>>> pprint(vars(ep.graph_options))
{'_graph_options': {'graph-language': 'gremlin-groovy',
'graph-name': 'TEST',
'graph-source': 'g'}}
>>> profile = DseGraph.create_execution_profile(graph_name=graph_name)
>>> vars(profile)
{'load_balancing_policy': <dse.policies.TokenAwarePolicy object at 0x7fe886033fd0>, 'request_timeout': 30.0, 'consistency_level': 10, 'continuous_paging_options': None, 'retry_policy': <dse.policies.NeverRetryPolicy object at 0x7fe886033f10>, 'graph_options': <dse.graph.query.GraphOptions object at 0x7fe886096690>, 'serial_consistency_level': None, 'row_factory': <function graph_traversal_dse_object_row_factory at 0x7fe886042140>, 'speculative_execution_policy': <dse.policies.NoSpeculativeExecutionPolicy object at 0x7fe886044050>}
>>> vars(profile.graph_options)
{'_graph_options': {'graph-language': 'bytecode-json', 'graph-name': 'TEST', 'graph-source': 'g'}}

I hope this can be either documented somewhere or be resolved. Quite annoying to dig out this bug

Environment

Ubuntu

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Bill Wang

Fix versions

None

Labels

Reproduced in

None

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Components

Sprint

Priority

Minor
Configure