blob: acc28839952f8795995b0713fee6ee58124e64ca [file] [log] [blame]
-- Explicitly set preserve_blanks='OFF'
DROP EXTERNAL TABLE IF EXISTS tbl_ext_fixedwidth;
CREATE READABLE EXTERNAL TABLE tbl_ext_fixedwidth (
s1 char(10), s2 varchar(10), s3 text)
LOCATION ('file://@hostname@@abs_srcdir@/data/fixedwidth_small_correct_whitespace.tbl')
FORMAT 'CUSTOM' (formatter='fixedwidth_in',
s1='10',s2='10', s3='10', preserve_blanks='OFF');
-- Confirm only the trailing while spaces will be trimmed.
-- The leading white spaces will be always reserved.
select * from tbl_ext_fixedwidth;
select * from tbl_ext_fixedwidth where s1='cha' and s2='vara' and s3='texta';
select * from tbl_ext_fixedwidth where s1=' chc' and s2=' varc' and s3=' textc';