[
https://issues.apache.org/jira/browse/PHOENIX-2141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maryann Xue updated PHOENIX-2141:
---------------------------------
Attachment: PHOENIX-2141-fix.patch
Updating the bug fix patch, adding changes to one test case:
{code}
@@ -218,8 +218,7 @@ public class WhereCompilerTest extends
BaseConnectionlessQueryTest {
@Test
public void testCollapseFunctionToNull() throws SQLException {
- String tenantId = "000000000000001";
- String query = "select * from atable where organization_id='" +
tenantId + "' and substr(entity_id,null) = 'foo'";
+ String query = "select * from atable where substr(entity_id,null) =
'foo'";
PhoenixConnection pconn = DriverManager.getConnection(getUrl(),
PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class);
PhoenixPreparedStatement pstmt = newPreparedStatement(pconn, query);
QueryPlan plan = pstmt.optimizeQuery();
{code}
Since the result of "organization_id='" + tenantId + "' and
substr(entity_id,null) = 'foo'" could be either FALSE or UNKNOWN, there is no
way to evaluate at compile time. So removed the first part of AND here.
> ComparisonExpression should return Boolean null if either operand is null
> -------------------------------------------------------------------------
>
> Key: PHOENIX-2141
> URL: https://issues.apache.org/jira/browse/PHOENIX-2141
> Project: Phoenix
> Issue Type: Bug
> Reporter: Maryann Xue
> Assignee: Maryann Xue
> Priority: Minor
> Attachments: PHOENIX-2141-fix.patch, PHOENIX-2141.patch,
> PHOENIX-2141_2.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)