Closed daviesluke closed 1 year ago
Table created as `CREATE TABLE test1 ( id VARCHAR2(20) NOT NULL, desc VARCHAR2(20) );
CREATE INDEX test1_idx ON test1 ( TO_NUMBER(ID) );`
When running in TABLE mode get the following SQL generated CREATE INDEX test1_idx ON test1 (((nullif(id, '')::numeric)));
CREATE INDEX test1_idx ON test1 (((nullif(id, '')::numeric)));
When running in COPY mode get the following SQL generated CREATE INDEX test1_idx ON test1 ((id)::numeric);
CREATE INDEX test1_idx ON test1 ((id)::numeric);
2nd SQL is invalid.
Table created as `CREATE TABLE test2 ( id VARCHAR2(254) NOT NULL, config_path VARCHAR2(254) NOT NULL, start_time TIMESTAMP(6) NOT NULL );
CREATE INDEX test2_idx ON test2 ( config_path, start_time desc );`
When running in TABLE mode get the following SQL generated CREATE INDEX test2_idx ON test2 (config_path, start_time desc);
CREATE INDEX test2_idx ON test2 (config_path, start_time desc);
When running in COPY mode get the following SQL generated CREATE INDEX test2_idx ON test2 (config_path, ("start_time desc"));
CREATE INDEX test2_idx ON test2 (config_path, ("start_time desc"));
2nd SQL is invalid
Example 1
Table created as `CREATE TABLE test1 ( id VARCHAR2(20) NOT NULL, desc VARCHAR2(20) );
CREATE INDEX test1_idx ON test1 ( TO_NUMBER(ID) );`
When running in TABLE mode get the following SQL generated
CREATE INDEX test1_idx ON test1 (((nullif(id, '')::numeric)));
When running in COPY mode get the following SQL generated
CREATE INDEX test1_idx ON test1 ((id)::numeric);
2nd SQL is invalid.
Example 2
Table created as `CREATE TABLE test2 ( id VARCHAR2(254) NOT NULL, config_path VARCHAR2(254) NOT NULL, start_time TIMESTAMP(6) NOT NULL );
CREATE INDEX test2_idx ON test2 ( config_path, start_time desc );`
When running in TABLE mode get the following SQL generated
CREATE INDEX test2_idx ON test2 (config_path, start_time desc);
When running in COPY mode get the following SQL generated
CREATE INDEX test2_idx ON test2 (config_path, ("start_time desc"));
2nd SQL is invalid