MCPcopy Create free account
hub / github.com/apache/cloudberry / parseargs

Function parseargs

src/backend/gporca/scripts/cal_bitmap_test.py:369–403  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

367# -----------------------------------------------------------------------------
368
369def parseargs():
370 parser = argparse.ArgumentParser(description=_help)
371
372 parser.add_argument("tests", metavar="TEST", choices=[[], "all", "none", "bitmap_scan_tests", "btree_ao_scan_tests",
373 "bitmap_ndv_scan_tests", "index_join_tests", "bfv_join_tests",
374 "index_only_scan_tests", "brin_tests"],
375 nargs="*",
376 help="Run these tests (all, none, bitmap_scan_tests, btree_ao_scan_tests, bitmap_ndv_scan_tests, "
377 "index_join_tests, bfv_join_tests, index_only_scan_tests, brin_tests), default is none")
378 parser.add_argument("--create", action="store_true",
379 help="Create the tables to use in the test")
380 parser.add_argument("--execute", type=int, default="0",
381 help="Number of times to execute queries, 0 (the default) means explain only")
382 parser.add_argument("--drop", action="store_true",
383 help="Drop the tables used in the test when finished")
384 parser.add_argument("--verbose", action="store_true",
385 help="Print more verbose output")
386 parser.add_argument("--logFile", default="",
387 help="Log diagnostic output to a file")
388 parser.add_argument("--host", default="",
389 help="Host to connect to (default is localhost or $PGHOST, if set).")
390 parser.add_argument("--port", type=int, default="0",
391 help="Port on the host to connect to (default is 0 or $PGPORT, if set)")
392 parser.add_argument("--dbName", default="",
393 help="Database name to connect to")
394 parser.add_argument("--appendOnly", action="store_true",
395 help="Create an append-only table. Default is a heap table")
396 parser.add_argument("--numRows", type=int, default="10000000",
397 help="Number of rows to INSERT INTO the table (default is 10 million)")
398
399 parser.set_defaults(verbose=False, filters=[], slice=(None, None))
400
401 # Parse the command line arguments
402 args = parser.parse_args()
403 return args, parser
404
405
406def log_output(str):

Callers 1

mainFunction · 0.70

Calls 1

parse_argsMethod · 0.80

Tested by

no test coverage detected