title: How to let ignite's cast function return null instead of throwing an exception?
body: <p>When I use ignate's <code>cast</code> function, when the source data cannot be converted to target type, then ignite will throw this exception:</p>
  
  <blockquote>
    <p>javax.cache.CacheException: Failed to run map query remotely.Failed to execute map query on the node: 3ed8c3f3-31d3-4e18-a41c-83e2b6d4bf4a, class org.apache.ignite.IgniteCheckedException:Failed to execute SQL query. Cannot parse "DATE" constant "xxxx";</p>
  </blockquote>
  
  <p>But I need it to use <code>null</code> instead when it cannot be converted, just like the Postgresql database.</p>
  
  <p>What should I do?</p>
  
  <p>Ignite version:2.6,JDBC version:2.5</p>
  
  <pre><code>SELECT CAST(city AS DATE) AS `a1` FROM orders GROUP BY CAST(city AS DATE);
  </code></pre>
  
  <p>Expected:</p>
  
  <pre><code>a1
  
  Null
  </code></pre>
  
  <p>Actual:  </p>
  
  <pre><code>java.sql.SQLException: javax.cache.CacheException: Failed to run map query remotely.Failed to execute map query on the node: 3ed8c3f3-31d3-4e18-a41c-83e2b6d4bf4a, class org.apache.ignite.IgniteCheckedException:Failed to execute SQL query. Cannot parse "DATE" constant "xxxx"; SQL statement:
  SELECT
  CAST(__Z0.city AS DATE) __C0_0
  FROM PUBLIC.ORDERS2 __Z0
  GROUP BY CAST(__Z0.city AS DATE) LIMIT 3 [22007-195]
  at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:751)
  at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:210)
  at org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeWithArguments(JdbcThinPreparedStatement.java:252)
  at org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeQuery(JdbcThinPreparedStatement.java:78)
  at com.uniplore.calculation.connectors.IgniteConnector.execute(IgniteConnector.java:58)
  at tests.AbstractFunctionTransTest.getResult(AbstractFunctionTransTest.java:65)
  at tests.IgniteFunctionTransTest.Date(IgniteFunctionTransTest.java:840)
  </code></pre>