FlinkStreamSQL的insert时不支持union all函数
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Domaine
- data-engineering, stream-processing
Piste de recherche
Commencez par SideSqlExec.java, en particulier joinFun, puis suivez l’appel depuis ExecuteProcessHelper.java indiqué dans la stack trace. Reproduisez la requête INSERT fournie avec son UNION ALL et examinez pourquoi le nom de la vue temporaire est créé plus d’une fois ; c’est terminé lorsque la requête n’échoue plus avec l’erreur de validation de table temporaire en double.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
insert into MyResult
select
r1.actionNum as actionNum,
r1.IMEI as IMEI,
r1.IMEIList as IMEIList,
r1.IMEIStatus as IMEIStatus,
r1.belongWarehouseId as belongWarehouseId,
r1.belongCustomerId as belongCustomerId,
r1.brand as brand,
r1.product as product,
r1.marketing_name as marketing_name,
r1.belongCustomer as belongCustomer,
r1.belongWarehouse as belongWarehouse
from
(
(
select
'0' as actionNum,
wcs.imei as IMEI,
wcs.imei_list as IMEIList,
'Available' as IMEIStatus,
wcs.warehouse_id as belongWarehouseId,
cw.enterprise_id as belongCustomerId,
sm.brand as brand,
concat(trim(sm.marketing_name), ' ', trim(sm.rom_ram), ' ', trim(sm.color)) as product,
sm.marketing_name as marketName,
'' as belongCustomer,
'' as belongWarehouse
from
t_channel_warehouse_current_stock as wcs
left join t_channel_warehouse as cw on wcs.warehouse_id=cw.id
left join t_enter_sap_mat as sm on wcs.material_id =sm.matnr
where
wcs.source_type in ('6')
and wcs.type in ('INSERT')
)
union all
(
select
'1' as actionNum,
wcs.imei as IMEI,
wcs.imei_list as IMEIList,
'Available' as IMEIStatus,
wcs.warehouse_id as belongWarehouseId,
cw.enterprise_id as belongCustomerId,
sm.brand as brand,
concat(trim(sm.marketing_name), ' ', trim(sm.rom_ram), ' ', trim(sm.color)) as product,
sm.marketing_name as marketName,
sm.rom_ram as rom_ram,
sm.color as color,
'' as belongCustomer,
'' as belongWarehouse
from
t_channel_warehouse_current_stock as wcs
left join t_channel_warehouse as cw on wcs.warehouse_id=cw.id
left join t_enter_sap_mat as sm on wcs.material_id =sm.matnr
where
wcs.source_type in ('6')
and wcs.status in ('1')
and wcs.type in ('UPDATE')
)
) r1
报错:
Exception in thread "main" org.apache.flink.table.api.ValidationException: Temporary table default_catalog.default_database.t_channel_warehouse_current_stock_t_channel_warehouse_0 already exists
at org.apache.flink.table.catalog.CatalogManager.lambda$createTemporaryTable$10(CatalogManager.java:472)
at java.util.HashMap.compute(HashMap.java:1197)
at org.apache.flink.table.catalog.CatalogManager.createTemporaryTable(CatalogManager.java:470)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.createTemporaryView(TableEnvironmentImpl.java:282)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.createTemporaryView(TableEnvironmentImpl.java:269)
at com.dtstack.flink.sql.side.SideSqlExec.joinFun(SideSqlExec.java:554)
at com.dtstack.flink.sql.side.SideSqlExec.exec(SideSqlExec.java:175)
at com.dtstack.flink.sql.exec.ExecuteProcessHelper.sqlTranslation(ExecuteProcessHelper.java:232)
at com.dtstack.flink.sql.exec.ExecuteProcessHelper.getStreamExecution(ExecuteProcessHelper.java:170)
at com.dtstack.flink.sql.Main.main(Main.java:41)
at com.dtstack.flink.sql.launcher.LauncherMain.main(LauncherMain.java:140)
- Langage dominant
- Java
- Étoiles
- 2k
- Forks
- 913
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de DTStack/flinkStreamSQL
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
DTStack/flinkStreamSQL#467 · 1 commentaire ·
-
这个如何引入使用flink-connector-hive啊 Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
DTStack/flinkStreamSQL#437 · 3 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
DTStack/flinkStreamSQL#432 · 1 commentaire ·
-
新版FlinkStreamSQL已经融合进FlinkX项目 Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
DTStack/flinkStreamSQL#431 ·
-
有无对sql 语法校验的方法 Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
DTStack/flinkStreamSQL#430 · 1 commentaire ·
Toutes les issues de DTStack/flinkStreamSQL
Issues similaires
-
certification
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Ouvertebug ecr
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Needs: Triage Type: Feature request
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
github/copilot-sdk#2760 ·