-
1. Re: Teiid Impala LIMIT Pushdown Not Working as Expected in Some Cases
walla2sl Aug 28, 2015 4:43 PM (in response to walla2sl)Also, forgot to mention we are running teiid-8.10.0.Final-jboss-dist
-
2. Re: Teiid Impala LIMIT Pushdown Not Working as Expected in Some Cases
shawkins Aug 28, 2015 7:34 PM (in response to walla2sl)What are the types of metric1 and metric2? More than likely the addition of them is adding an implicit conversion that is not being seen as supported by the translator.
-
3. Re: Teiid Impala LIMIT Pushdown Not Working as Expected in Some Cases
walla2sl Aug 31, 2015 9:35 AM (in response to shawkins)Thanks for your response, Steven.
The data types are bigdecimal and long. If I try with two bigdecimal metrics, you are correct, the pushdown works as expected. If I try to cast the long as bigdecimal within the sum, I still don't see pushdown. Also, I didn't mention that the aggregation is also not pushed down.
Any ideas on how I could resolve this?
BTW, I have another Teiid instance, running Teiid 8.8.0, with translator-hive-8.8.0.CR1.jar, and the push down appears to be working. Strange that a later translator version appears to not be supporting similar behavior.
-
4. Re: Teiid Impala LIMIT Pushdown Not Working as Expected in Some Cases
walla2sl Aug 31, 2015 1:00 PM (in response to walla2sl)sum(cast(metric1 as double) + cast(metric2 as double)) seems to work. I believe this is a suitable workaround.
-
5. Re: Teiid Impala LIMIT Pushdown Not Working as Expected in Some Cases
shawkins Aug 31, 2015 8:01 PM (in response to walla2sl)> BTW, I have another Teiid instance, running Teiid 8.8.0, with translator-hive-8.8.0.CR1.jar, and the push down appears to be working. Strange that a later translator version appears to not be supporting similar behavior.
I believe there was an earlier issue where the translators were not being checked for convert/cast restrictions, but now they are.
> sum(cast(metric1 as double) + cast(metric2 as double)) seems to work. I believe this is a suitable workaround.
Yes, that would work as there is a type mapping for double.
Someone also opened a pull request: https://github.com/teiid/teiid/pull/519
To add a type mapping for decimal, but that is not supported by older versions of impala, so we're not quite ready to commit that yet.
-
6. Re: Teiid Impala LIMIT Pushdown Not Working as Expected in Some Cases
shawkins Sep 14, 2015 11:16 AM (in response to shawkins)This was logged and worked as [TEIID-3700] Add a type mapping for impala decimal - JBoss Issue Tracker which will be in Teiid 8.12 CR1.