control substitution on statement ok SET exon.bam_parse_tags = true; statement ok CREATE EXTERNAL TABLE bam STORED AS BAM LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/bam/test.bam'; query T SELECT name, flag, reference, start, end, mapping_quality, cigar, mate_reference FROM bam LIMIT 1; ---- READ_ID 83 chr1 12203704 12217173 NULL 55M13394N21M chr1 query T SELECT sequence FROM bam LIMIT 1; ---- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA query T SELECT array_element(quality_score, 1) FROM bam LIMIT 5; ---- 23 20 37 34 31 query T SELECT array_length(quality_score) FROM bam LIMIT 5; ---- 76 76 76 76 76 query I SELECT tags."NH", tags."HI", tags."AS", tags."nM", tags."NM", tags."XS", tags."RG" FROM bam LIMIT 1; ---- 1 1 149 1 0 45 H7G9G.1 statement ok DROP TABLE bam; statement ok CREATE EXTERNAL TABLE bam STORED AS BAM PARTITIONED BY (sample) LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/bam-partition'; query T SELECT name, sample FROM bam WHERE sample = '2' LIMIT 1; ---- READ_ID 2 statement ok DROP TABLE bam; query T SELECT COUNT(*) FROM bam_scan('$CARGO_MANIFEST_DIR/test-data/datasources/bam/test.bam'); ---- 61 query T SELECT COUNT(*) FROM bam_scan('$CARGO_MANIFEST_DIR/test-data/datasources/bam-partition'); ---- 122 statement ok SET exon.bam_parse_tags = true; query T SELECT tags."NH", tags."XS" FROM bam_scan('$CARGO_MANIFEST_DIR/test-data/datasources/bam/test.bam') LIMIT 5; ---- 1 45 1 NULL 1 NULL 1 NULL 1 NULL