Hello!
I have dremio-oss 4.5.0 and postgresql database with next table:
create schema test;
create table test.test(column_1 integer);
I can preview and run the next query without problem
SELECT column_1 as "1_3_5_7_9_12_15_18_21_24_27_30_33_36_39_42_45_48_51_54_57_60_63"
FROM "Local".test.test
But the next query I can only preview (on run I have error):
SELECT column_1 as "1_3_5_7_9_12_15_18_21_24_27_30_33_36_39_42_45_48_51_54_57_60_63+"
FROM "Local".test.test
The error happens because Postgres has limit to 63 bytes (by default) for the column name and statement metadata return name of the column that not equals with dremio metadata.
But sometimes it doesn’t happen. For example
SELECT midalias AS "1_3_5_7_9_12_15_18_21_24_27_30_33_36_39_42_45_48_51_54_57_60_63+"
FROM (
SELECT column_1 as "midalias" FROM "Local".test.test
) subq
Or even without subquery:
select scr_id as "Превед Медвед! И еще много разного текста для удлинения имени атрибута" from dwh."dm_some_account"."dm_some_person" <!-- Works. There is no alias in pushdouwn (generated sql) -->
select 1 as "Превед Медвед! И еще много разного текста для удлинения имени атрибута" from dwh."dm_some_account"."dm_some_person" <!-- Don't work. There is alias in pushdouwn (generated sql) -->
How to disable alias pushdown for all cases or what logic is used to decide use alias in final sql or not?