<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/sharding-sphere/sharding-sphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="http://shardingsphere.io/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 <strong>more than 7 days</strong> 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">3.1.0</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">support GROUP_CONCAT</p>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Table 'etl_data.MailSensitiveWord' doesn't exist"><pre class="notranslate"><code class="notranslate">Table 'etl_data.MailSensitiveWord' doesn't exist
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">antlr parsing error. <code class="notranslate">AntlrParsingEngine</code> did not extract <code class="notranslate">FromWhereSegment</code><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1615053/53952965-286b1f00-410d-11e9-8da2-eae00b15d150.png"><img src="https://user-images.githubusercontent.com/1615053/53952965-286b1f00-410d-11e9-8da2-eae00b15d150.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<ol dir="auto">
<li>config 2 datasources</li>
<li>config logic table A mapping to table A of one of datasource(not the default one)</li>
<li>select group_concat(wordType) from A group by wordType;</li>
<li>error</li>
</ol>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<p dir="auto">Spring Boot ::                             v2.4.2<br>
Spring:                                       v5.3.3<br>
Spring Data JPA<br>
Hibernate ORM core version:   5.4.27.Final<br>
Database:                                  postgresql-13.1<br>
shardingsphere:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;dependency&gt;
         &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
          &lt;artifactId&gt;shardingsphere-jdbc-core-spring-boot-starter&lt;/artifactId&gt;
          &lt;version&gt;5.0.0-alpha&lt;/version&gt;
&lt;/dependency&gt;"><pre class="notranslate">&lt;<span class="pl-ent">dependency</span>&gt;
         &lt;<span class="pl-ent">groupId</span>&gt;org.apache.shardingsphere&lt;/<span class="pl-ent">groupId</span>&gt;
          &lt;<span class="pl-ent">artifactId</span>&gt;shardingsphere-jdbc-core-spring-boot-starter&lt;/<span class="pl-ent">artifactId</span>&gt;
          &lt;<span class="pl-ent">version</span>&gt;5.0.0-alpha&lt;/<span class="pl-ent">version</span>&gt;
&lt;/<span class="pl-ent">dependency</span>&gt;</pre></div>
<p dir="auto">application.yml:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="spring:
  shardingsphere:
    props:
      sql.show: true
    datasource:
      common:
        driver-class-name: org.postgresql.Driver
        type: com.alibaba.druid.pool.DruidDataSource
      names: master0
      master0:
        # postgres database
        url: jdbc:postgresql://localhost:5432/kpi
        username: potgres
        password: postgres
        initialization-mode: always
    rules:
      sharding:
        key-generators:
          snowflake:
            type: SNOWFLAKE
            props:
              worker-id: 1
        sharding-algorithms:
          sharding-by-month: 
            type: INTERVAL 
            props: 
              datetime-pattern: &quot;yyyy-MM-dd HH:mm:ss&quot;
              datetime-lower: &quot;2021-02-01 00:00:00&quot;
              datetime-upper: &quot;2021-12-31 23:59:59&quot;
              sharding-suffix-pattern: &quot;yyyyMM&quot;
              datetime-interval-amount: 1
              datetime-interval-unit: &quot;MONTHS&quot;
        tables:
          kpi_data: 
            actual-data-nodes: master0.kpi_data_$-&gt;{2021..2021}0$-&gt;{1..9}, master0.kpi_data_$-&gt;{2021..2021}$-&gt;{10..12}
            table-strategy:
              standard:
                sharding-column: begin_time
                sharding-algorithm-name: sharding-by-month
            key-generate-strategy:
              column: id
              key-generator-name: snowflake
    enabled: true
  jpa:
    hibernate:
      ddl-auto: update #none
    show-sql: true
    properties:
      hibernate:
        temp:
        use_jdbc_metadata_defaults: false"><pre class="notranslate"><span class="pl-ent">spring</span>:
  <span class="pl-ent">shardingsphere</span>:
    <span class="pl-ent">props</span>:
      <span class="pl-ent">sql.show</span>: <span class="pl-c1">true</span>
    <span class="pl-ent">datasource</span>:
      <span class="pl-ent">common</span>:
        <span class="pl-ent">driver-class-name</span>: <span class="pl-s">org.postgresql.Driver</span>
        <span class="pl-ent">type</span>: <span class="pl-s">com.alibaba.druid.pool.DruidDataSource</span>
      <span class="pl-ent">names</span>: <span class="pl-s">master0</span>
      <span class="pl-ent">master0</span>:
        <span class="pl-c"><span class="pl-c">#</span> postgres database</span>
        <span class="pl-ent">url</span>: <span class="pl-s">jdbc:postgresql://localhost:5432/kpi</span>
        <span class="pl-ent">username</span>: <span class="pl-s">potgres</span>
        <span class="pl-ent">password</span>: <span class="pl-s">postgres</span>
        <span class="pl-ent">initialization-mode</span>: <span class="pl-s">always</span>
    <span class="pl-ent">rules</span>:
      <span class="pl-ent">sharding</span>:
        <span class="pl-ent">key-generators</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">1</span>
        <span class="pl-ent">sharding-algorithms</span>:
          <span class="pl-ent">sharding-by-month</span>: 
            <span class="pl-ent">type</span>: <span class="pl-s">INTERVAL </span>
            <span class="pl-ent">props</span>: 
              <span class="pl-ent">datetime-pattern</span>: <span class="pl-s"><span class="pl-pds">"</span>yyyy-MM-dd HH:mm:ss<span class="pl-pds">"</span></span>
              <span class="pl-ent">datetime-lower</span>: <span class="pl-s"><span class="pl-pds">"</span>2021-02-01 00:00:00<span class="pl-pds">"</span></span>
              <span class="pl-ent">datetime-upper</span>: <span class="pl-s"><span class="pl-pds">"</span>2021-12-31 23:59:59<span class="pl-pds">"</span></span>
              <span class="pl-ent">sharding-suffix-pattern</span>: <span class="pl-s"><span class="pl-pds">"</span>yyyyMM<span class="pl-pds">"</span></span>
              <span class="pl-ent">datetime-interval-amount</span>: <span class="pl-c1">1</span>
              <span class="pl-ent">datetime-interval-unit</span>: <span class="pl-s"><span class="pl-pds">"</span>MONTHS<span class="pl-pds">"</span></span>
        <span class="pl-ent">tables</span>:
          <span class="pl-ent">kpi_data</span>: 
            <span class="pl-ent">actual-data-nodes</span>: <span class="pl-s">master0.kpi_data_$-&gt;{2021..2021}0$-&gt;{1..9}, master0.kpi_data_$-&gt;{2021..2021}$-&gt;{10..12}</span>
            <span class="pl-ent">table-strategy</span>:
              <span class="pl-ent">standard</span>:
                <span class="pl-ent">sharding-column</span>: <span class="pl-s">begin_time</span>
                <span class="pl-ent">sharding-algorithm-name</span>: <span class="pl-s">sharding-by-month</span>
            <span class="pl-ent">key-generate-strategy</span>:
              <span class="pl-ent">column</span>: <span class="pl-s">id</span>
              <span class="pl-ent">key-generator-name</span>: <span class="pl-s">snowflake</span>
    <span class="pl-ent">enabled</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">jpa</span>:
    <span class="pl-ent">hibernate</span>:
      <span class="pl-ent">ddl-auto</span>: <span class="pl-s">update </span><span class="pl-c"><span class="pl-c">#</span>none</span>
    <span class="pl-ent">show-sql</span>: <span class="pl-c1">true</span>
    <span class="pl-ent">properties</span>:
      <span class="pl-ent">hibernate</span>:
        <span class="pl-ent">temp</span>:
        <span class="pl-ent">use_jdbc_metadata_defaults</span>: <span class="pl-c1">false</span></pre></div>
<p dir="auto">when application starts, exception occurs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
......
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:421) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.3.jar:5.3.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.3.jar:5.3.3]
	... 22 common frames omitted
Caused by: org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
	at org.apache.shardingsphere.sharding.route.engine.type.unconfigured.ShardingUnconfiguredTablesRoutingEngine.route(ShardingUnconfiguredTablesRoutingEngine.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:70) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:59) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:57) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:52) ~[shardingsphere-infra-context-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:289) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery(ShardingSphereStatement.java:126) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
	at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:42) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:65) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.&lt;init&gt;(DatabaseInformationImpl.java:59) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.internal.Helper.buildDatabaseInformation(Helper.java:155) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:96) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:316) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:469) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1259) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.3.jar:5.3.3]
	... 26 common frames omitted"><pre lang="log" class="notranslate"><code class="notranslate">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
......
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:421) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.3.jar:5.3.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.3.jar:5.3.3]
	... 22 common frames omitted
Caused by: org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
	at org.apache.shardingsphere.sharding.route.engine.type.unconfigured.ShardingUnconfiguredTablesRoutingEngine.route(ShardingUnconfiguredTablesRoutingEngine.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:70) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:59) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:57) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:52) ~[shardingsphere-infra-context-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:289) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery(ShardingSphereStatement.java:126) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
	at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:42) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:65) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.&lt;init&gt;(DatabaseInformationImpl.java:59) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.internal.Helper.buildDatabaseInformation(Helper.java:155) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:96) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:316) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:469) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1259) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.3.jar:5.3.3]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.3.jar:5.3.3]
	... 26 common frames omitted
</code></pre></div>
<hr>
<p dir="auto">'select * from information_schema.sequences' will be automatically exceuted before creating table, then exception occurs</p>