Dremio generate wrong sql

Hi, Dremio in 4.0.5-201911202046080257-19b10938 generate a query without alias but
after upgrade to latest dremio version the query generate is:

SELECT "AH_CUENTA"."OFICIAL_CUENTA", "AH_CUENTA"."AGENCIA", "AH_CUENTA"."NUM_CTA_AHORRO", "AH_CUENTA"."ID_CLIENTE", "AH_CUENTA"."STATUS_CUENTA", "AH_CUENTA"."TIPO_CUENTA", "AH_CUENTA"."SALDO_CUENTA", "AH_CUENTA"."SALDO_DISPONIBLE", "AH_CUENTA"."CHEQUES", "AH_CUENTA"."BLOQUEOS", "AH_CUENTA"."FECHA", "AH_CUENTA"."PLAZO"
FROM "REPORTES"."AH_CUENTA" FETCH FIRST 2000 ROWS ONLY

Note that dremio adds "AH_CUENTA" in each table column but this causes fail in origin datasource because "AH_CUENTA" is not an alias.

6ca32154-34d8-4fb5-9082-2d10fdfba48e.zip (13,1 KB)

@balaji.ramaswamy @ben please can you help explain?
apprently after upgrade dremio generate "AH_CUENTA"."OFICIAL_CUENTA" as column name but this is incorrect de column name is only "OFICIAL_CUENTA" because "AH_CUENTA" is the table name and "REPORTES" is the schema name

Can I using some as https://github.com/dremio-hub/dremio-hbase-connector to build cutom connector that override this wrong column names generated?? which class I should use?

@dacopan,

Is the source DB2? Unfortunately, we no longer support that connector, so unless a comparable problem presents itself in another officially supported source, I don’t think we can “fix” the pushdown.

I developed a custom connector that is very madurate we want contributing to dremio with it, all work well only when query to other scheme present this issue,

  • in postgres also generated this issue, but postgres doesnt fail because internal driver avoid this wrong names

the questions is:

  • using custom connector can i override this wrong columns name generated?
  • what changed from 4.0.5 to latest dremio that cause this wrong column names?
    Very thanks by your response

Thanks @ben, using this explain by @jduong Push down not work expected I fixed the error extending ArpDialect and @Override hasImplicitTableAlias to false but can you explained me whats is this method? or any documentation about ArpDialect?

@ben

Is there any example about override JdbcSchemaFetcher?