It is probably broken.
This is my input :
>>> dsDict = {"carg" : cargarDS}
>>> ds = tjtasDS.execute("""
... select carg.NroTarjeta
... , ifnull(nullif(carg.Apellido, ''), dataset.Apellido)
... , ifnull(nullif(carg.Nombre, ''), dataset.Nombre)
... , ifnull(nullif(carg.Ubicacion, ''), dataset.Ubicacion)
... , ifnull(nullif(carg.Observaciones, ''),
dataset.Observaciones)
... from carg, dataset
... where carg.NroTarjeta = dataset.NroTarjeta
... union all
... select NroTarjeta, Apellido, Nombre, Ubicacion, Observaciones
... from carg
... where carg.NroTarjeta not in (select NroTarjeta from
dataset)
... union all
... select NroTarjeta, Apellido, Nombre, Ubicacion, Observaciones
... from dataset
... where dataset.NroTarjeta not in (select NroTarjeta from
carg)
... """, cursorDict=dsDict)
>>> print ds
>>> dsDict
>>> cargarDS
>>> tjtasDS
This is the output :
None
{'carg': ({'Apellido': u'', 'pkId': 1, 'Observaciones': u'',
'NroTarjeta': 3817748544L, 'Ubicacion': u'', 'Nombre': u''},
{'Apellido': u'', 'pkId': 2, 'Observaciones': u'', 'NroTarjeta':
206, 'Ubicacion': u'', 'Nombre': u''}, {'Apellido': u'', 'pkId': 3,
'Observaciones': u'', 'NroTarjeta': 839974912, 'Ubicacion': u'',
'Nombre': u''})}
({'Apellido': u'', 'pkId': 1, 'Observaciones': u'', 'NroTarjeta':
3817748544L, 'Ubicacion': u'', 'Nombre': u''}, {'Apellido': u'',
'pkId': 2, 'Observaciones': u'', 'NroTarjeta': 206, 'Ubicacion':
u'', 'Nombre': u''}, {'Apellido': u'', 'pkId': 3, 'Observaciones':
u'', 'NroTarjeta': 839974912, 'Ubicacion': u'', 'Nombre': u''})
()
As you can see the resulting ds is None (it should at least be an
empty tuple just like tjtasDS).
The expected result of the select statement is the data set that
appears inside the dsDict dictionary!!! Which shouldn't have changed
at all.
The last two data sets are there so you can see the data I'm working
with and reproduce the issue. tjtasDS is an empty data set.