<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">master</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">proxy</p>
<h3 dir="auto">Expected behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="insert into account values(1,0),(2,100);
select * from account;
 id | balance 
----+---------
  2 |     100
  1 |       0"><pre class="notranslate"><code class="notranslate">insert into account values(1,0),(2,100);
select * from account;
 id | balance 
----+---------
  2 |     100
  1 |       0
</code></pre></div>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" id | balance 
----+---------
  2 |     100
  1 |       0
  2 |     100
  1 |       0"><pre class="notranslate"><code class="notranslate"> id | balance 
----+---------
  2 |     100
  1 |       0
  2 |     100
  1 |       0
</code></pre></div>
<h3 dir="auto">config</h3>
<p dir="auto">config-sharding.yaml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="schemaName: sbtest_sharding

dataSources:
  ds_0:
    url: jdbc:postgresql://127.0.0.1:15401/sbtest?useSSL=false&amp;useServerPrepStmts=true&amp;cachePrepStmts=true&amp;prepStmtCacheSize=8192&amp;prepStmtCacheSqlLimit=1024
    username: test
    password: 12345678
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 2000
    minPoolSize: 1
  ds_1:
    url: jdbc:postgresql://127.0.0.1:15402/sbtest?useSSL=false&amp;useServerPrepStmts=true&amp;cachePrepStmts=true&amp;prepStmtCacheSize=8192&amp;prepStmtCacheSqlLimit=1024
    username: test
    password: 12345678
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 2000
    minPoolSize: 1



rules:
  - !SHARDING
    tables:
      account:
        actualDataNodes: ds_${0..1}.account_${0..1}
        tableStrategy:
          standard:
            shardingColumn: id
            shardingAlgorithmName: account_inline
        keyGenerateStrategy:
          column: id
          keyGeneratorName: snowflake

    defaultDatabaseStrategy:
      standard:
        shardingColumn: id
        shardingAlgorithmName: database_inline

    shardingAlgorithms:
      database_inline:
        type: INLINE
        props:
          algorithm-expression: ds_${id % 2}
      account_inline:
        type: INLINE
        props:
          algorithm-expression: account_${id % 2}
    keyGenerators:
      snowflake:
        type: SNOWFLAKE
        props:
          worker-id: 123"><pre class="notranslate"><span class="pl-ent">schemaName</span>: <span class="pl-s">sbtest_sharding</span>

<span class="pl-ent">dataSources</span>:
  <span class="pl-ent">ds_0</span>:
    <span class="pl-ent">url</span>: <span class="pl-s">jdbc:postgresql://127.0.0.1:15401/sbtest?useSSL=false&amp;useServerPrepStmts=true&amp;cachePrepStmts=true&amp;prepStmtCacheSize=8192&amp;prepStmtCacheSqlLimit=1024</span>
    <span class="pl-ent">username</span>: <span class="pl-s">test</span>
    <span class="pl-ent">password</span>: <span class="pl-c1">12345678</span>
    <span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span>
    <span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span>
    <span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span>
    <span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">2000</span>
    <span class="pl-ent">minPoolSize</span>: <span class="pl-c1">1</span>
  <span class="pl-ent">ds_1</span>:
    <span class="pl-ent">url</span>: <span class="pl-s">jdbc:postgresql://127.0.0.1:15402/sbtest?useSSL=false&amp;useServerPrepStmts=true&amp;cachePrepStmts=true&amp;prepStmtCacheSize=8192&amp;prepStmtCacheSqlLimit=1024</span>
    <span class="pl-ent">username</span>: <span class="pl-s">test</span>
    <span class="pl-ent">password</span>: <span class="pl-c1">12345678</span>
    <span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span>
    <span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span>
    <span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span>
    <span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">2000</span>
    <span class="pl-ent">minPoolSize</span>: <span class="pl-c1">1</span>



<span class="pl-ent">rules</span>:
  - <span class="pl-k">!SHARDING</span>
    <span class="pl-ent">tables</span>:
      <span class="pl-ent">account</span>:
        <span class="pl-ent">actualDataNodes</span>: <span class="pl-s">ds_${0..1}.account_${0..1}</span>
        <span class="pl-ent">tableStrategy</span>:
          <span class="pl-ent">standard</span>:
            <span class="pl-ent">shardingColumn</span>: <span class="pl-s">id</span>
            <span class="pl-ent">shardingAlgorithmName</span>: <span class="pl-s">account_inline</span>
        <span class="pl-ent">keyGenerateStrategy</span>:
          <span class="pl-ent">column</span>: <span class="pl-s">id</span>
          <span class="pl-ent">keyGeneratorName</span>: <span class="pl-s">snowflake</span>

    <span class="pl-ent">defaultDatabaseStrategy</span>:
      <span class="pl-ent">standard</span>:
        <span class="pl-ent">shardingColumn</span>: <span class="pl-s">id</span>
        <span class="pl-ent">shardingAlgorithmName</span>: <span class="pl-s">database_inline</span>

    <span class="pl-ent">shardingAlgorithms</span>:
      <span class="pl-ent">database_inline</span>:
        <span class="pl-ent">type</span>: <span class="pl-s">INLINE</span>
        <span class="pl-ent">props</span>:
          <span class="pl-ent">algorithm-expression</span>: <span class="pl-s">ds_${id % 2}</span>
      <span class="pl-ent">account_inline</span>:
        <span class="pl-ent">type</span>: <span class="pl-s">INLINE</span>
        <span class="pl-ent">props</span>:
          <span class="pl-ent">algorithm-expression</span>: <span class="pl-s">account_${id % 2}</span>
    <span class="pl-ent">keyGenerators</span>:
      <span class="pl-ent">snowflake</span>:
        <span class="pl-ent">type</span>: <span class="pl-s">SNOWFLAKE</span>
        <span class="pl-ent">props</span>:
          <span class="pl-ent">worker-id</span>: <span class="pl-c1">123</span></pre></div>
<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">5.1.1</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">The sql executes correctly</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">sql parsing generates errors that are not actually sql errors</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute</h3>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="select o.* from t_order o where o.json_field -&gt; '$.${item.key}' is null and o.create_time &gt; xxx and o.create_time &lt;yyy;"><pre class="notranslate"><span class="pl-k">select</span> o.<span class="pl-k">*</span> <span class="pl-k">from</span> t_order o <span class="pl-k">where</span> <span class="pl-c1">o</span>.<span class="pl-c1">json_field</span> <span class="pl-k">-</span><span class="pl-k">&gt;</span> <span class="pl-s"><span class="pl-pds">'</span>$.${item.key}<span class="pl-pds">'</span></span> is <span class="pl-k">null</span> <span class="pl-k">and</span> <span class="pl-c1">o</span>.<span class="pl-c1">create_time</span> <span class="pl-k">&gt;</span> xxx <span class="pl-k">and</span> <span class="pl-c1">o</span>.<span class="pl-c1">create_time</span> <span class="pl-k">&lt;</span>yyy;</pre></div>
<p dir="auto">create_time as a sharding field, but doesn't seem to support json syntax? If I remove <code class="notranslate">o.json_field -&gt; '$.${item.key}' is null </code>, there will be no error. However, this sql can be executed normally in mysql.</p>
<p dir="auto">create_time作为分片字段，但是貌似不支持json语法？如果我移除<code class="notranslate">o.json_field -&gt; '$.${item.key}' is null </code>，就不会报错。然而这个sql是能在mysql里正常执行的</p>