kyuubi icon indicating copy to clipboard operation
kyuubi copied to clipboard

[FEATURE] 支持算子血缘

Open melin opened this issue 1 year ago • 4 comments

Code of Conduct

Search before asking

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

Describe the feature

@iodone 需要知道输出表某个字段加工口径,例如 c = concat(a, ' ', b) ,血缘信息中保留c 的加工表达式。

Motivation

No response

Describe the solution

No response

Additional context

No response

Are you willing to submit PR?

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

melin avatar Sep 13 '22 06:09 melin

能够找一个复杂的例子具体说明一下么?比如带有子查询的SQL,对应的加工方式应该如何表达。

iodone avatar Sep 14 '22 01:09 iodone

能够找一个复杂的例子具体说明一下么?比如带有子查询的SQL,对应的加工方式应该如何表达。

参考一下sqlflow演示图,能否做到保留路径信息,以及加工表达式?

INSERT INTO t2(a, b)
SELECT 
	tt1.a AS a, 
	tt1.b AS b 
FROM (
	SELECT 
		a AS a, 
		MAX(b + c) as b 
	FROM t1 
	WHERE d > 1 
) AS tt1 

b -> tt1.b-> max(b+c)

https://sqlflow.gudusoft.com/#/ image

melin avatar Sep 14 '22 03:09 melin

INSERT INTO t2(a, b)
SELECT 
	tt1.a AS a, 
	tt1.b AS b 
FROM (
	SELECT 
		a AS a, 
		MAX(t2.b, t1.c) as b 
	FROM (select sum(a) + sum(c) as b from t1 ) t2 
	WHERE d > 1 
) AS tt1 

类似这种更复杂,有分叉的该怎么描述,感觉这个flow过程还不如看逻辑计划来的更清楚

iodone avatar Sep 14 '22 06:09 iodone

对于业务人员希望看到的时候图形化,sql 是有层次的,关联层次展现就可以。

melin avatar Sep 14 '22 07:09 melin

@melin 我这边做了一个SQL可视化展示和编辑的功能,但是由于缺少前端开发人员,导致展现的不太好。感兴趣的可以一块开发.

insert

gabrywu avatar Oct 12 '22 12:10 gabrywu

image

实线是直接关系,虚线是间接关系,groupby having where 是间接关系 image

melin avatar Oct 12 '22 14:10 melin

image

实线是直接关系,虚线是间接关系,groupby having where 是间接关系 image

还是大佬这个页面展示的牛逼

gabrywu avatar Oct 13 '22 06:10 gabrywu