Skip to content
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

cqlgen creates erroneous prepared-statements in the main-scan section #1683

Open
jclu123 opened this issue Nov 21, 2023 · 1 comment
Open

Comments

@jclu123
Copy link

jclu123 commented Nov 21, 2023

Describe the bug
I used cqlgen to create a workload yaml and it produces an erroneous main-scan section that looks like this...

main-scan: params: timeout: 30.0 ops: scan-table-edm_document_ks-shipment_doc_126: ratio: 651 prepared: "select * from edm_document_ks.shipment_doc_126\nwhere \n LIMIT 10;\n" scan-table-edm_document_ks-shipment_grp_645: ratio: 5726 prepared: "select * from edm_document_ks.shipment_grp_645\nwhere \n LIMIT 10;\n" scan-table-edm_document_ks-shipment_grp_uuid_lookup_111: ratio: 378 prepared: "select * from edm_document_ks.shipment_grp_uuid_lookup_111\nwhere \n LIMIT 10;\n" scan-table-edm_document_ks-signature_doc_116: ratio: 465 prepared: "select * from edm_document_ks.signature_doc_116\nwhere \n LIMIT 10;\n"

To Reproduce
Steps to reproduce the behavior:

  1. This is how the workload file was produced: 5.17.3/nb5 cqlgen edm_prod_shipment.cql edm_prod_workload.yaml tablestats where cql is a simply a download a keyspace description and tablestats nodetool tablestats of the said keyspace
  2. Run produced yaml: edm_prod_workload.yaml as /5.17.2/nb5 edm_prod_workload default hosts=xxxxx username=xxx password=xxx truststore=aTruststore tspass=aPass port=9042 ssl=jdk localdc=DC1 and see errors in logs java.lang.RuntimeException: javax.script.ScriptException: io.nosqlbench.api.errors.OpConfigError: Error while configuring op from workload template: [from:yaml:edm_prod_workload_v0] cause: OpConfigError:Error while configuring op from workload template: com.datastax.oss.driver.api.core.servererrors.SyntaxError: line 3:1 no viable alternative at input 'LIMIT' (...* from ks_00001.tb_00001_126where [LIMIT]...)( for statement 'parsed: [select * from ks_00001.tb_00001_126 where LIMIT 10; ]')

What was Expected
A prepared statement section that should parse correctly

Additional context
This was run with nb version 5.17.2 on WSL2 (ubuntu 20.04)

Screenshots, if applicable

@jshook
Copy link
Contributor

jshook commented Dec 7, 2023

Can we get more info on edm_prod_shipment.cql and the error you saw?

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

No branches or pull requests

2 participants