doris icon indicating copy to clipboard operation
doris copied to clipboard

when use two view table left jon hive error not hive param

Open FelixDonChen opened this issue 3 years ago • 4 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

1.1.1

What's Wrong?

 create view test.test_cdc_product_sku_correlation as 
         select 
          sku_id, 
          cor_alternative_id, 
          cor_account_code, 
          max(create_time) create_time
       from dim.dim_cdc_t_product_sku_correlation
       where cor_system = '1123'
       group by sku_id, cor_alternative_id, cor_account_code ;

create view test.test_v_price_reptile as SELECT t1.cor_alternative_id, CASE WHEN shelf_status = 1 THEN '上架' WHEN shelf_status = 2 THEN '无库存' ELSE '下架' END listing_Status FROM (SELECT cor_alternative_id, max(etl_time) etl_time FROM dwd.dwd_esc_t_test_price_reptile where cor_alternative_id is not null GROUP BY 1)t1 LEFT JOIN dwd.dwd_esc_t_test_price_reptile t2 ON t1.cor_alternative_id = t2.cor_alternative_id AND t1.etl_time = t2.etl_time ;

select * from test.test_cdc_product_sku_correlation t1 left join test.test_v_price_reptile t2 on t1.cor_alternative_id = t2.cor_alternative_id and t1.cor_alternative_id is not null;

org.jkiss.dbeaver.model.sql.DBSQLException: SQL 错误 [1054] [42S22]: errCode = 2, detailMessage = Unknown column 'cor_alternative_id' in 't2' at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:577) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$1(SQLQueryJob.java:486) at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:172) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:493) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:894) at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:3642) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:118) at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:172) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:116) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:4891) at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.sql.SQLSyntaxErrorException: errCode = 2, detailMessage = Unknown column 'cor_alternative_id' in 't2' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:329) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.lambda$0(JDBCStatementImpl.java:131) at org.jkiss.dbeaver.utils.SecurityManagerUtils.wrapDriverActions(SecurityManagerUtils.java:94) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131) ... 12 more

What You Expected?

I use 0.15.3 and 1.1.0 no hive this issues!

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

FelixDonChen avatar Aug 11 '22 07:08 FelixDonChen

i think this could be resolved by #11566 , @englefly what do u think?

morrySnow avatar Aug 11 '22 09:08 morrySnow

cor_alternative_id

yes, I think so.

englefly avatar Aug 11 '22 09:08 englefly

@FelixDonChen this bug will be fixed in version 1.1.2. It should be released at the end of this month or the beginning of next month

morrySnow avatar Aug 11 '22 09:08 morrySnow

@FelixDonChen this bug will be fixed in version 1.1.2. It should be released at the end of this month or the beginning of next month

version 1.1.2 will be released next week

kpfly avatar Aug 11 '22 09:08 kpfly