apache / apache/linkis

[Bug] jdbc task cannot obtain the set variable value when the task takes a long time

Open
#4,276 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.4k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

### Search before asking

- [X] I searched the [issues](https://github.com/apache/linkis/issues) and found no similar issues.

### Linkis Component

linkis-engineconnn-plugin

### Steps to reproduce

1, create a jdbc job ,then publish to schedulis;
2, the jdbc job have set variable like below:
set yesterday= date_sub(current_date,1);
3, used variable like :
select * from xxx where usetime>= ${hiveconf:yesterday}
4, server get the code right.
select * from xxx where usetime>= ${hiveconf:yesterday}
5, but the final conversion sql is:
select * from xxx where usetime>=
![sqlerror](https://user-images.githubusercontent.com/26196789/221530182-a1240b9d-5dc0-4bdb-b85b-689774c44ddb.png)

### Expected behavior

final conversion sql is:
select * from xxx where usetime>= date_sub(current_date,1)

### Your environment

- Linkis version used: 1.1.1
- Environment name and version:
- cdh-6.3.2
- hive-2.1.1
- spark-2.4 & 3.2
- jdk 1.8.0_121

### Anything else

_No response_

### Are you willing to submit a PR?

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.