Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE Caused by: java.lang.NullPointerException at org.apache.shardingsphere.sharding.merge.dql.groupby.GroupByMemoryMergedResult.getValueCaseSensitiveFromTables(GroupByMemoryMergedResult.java:135) #33637

Open
SHEN-Mr opened this issue Nov 13, 2024 · 2 comments

Comments

@SHEN-Mr
Copy link

SHEN-Mr commented Nov 13, 2024

rules:
    sharding:
      tables:
     
        t_request_log:
          #start date 20240910 - end date 20240910
          actual-data-nodes: master.t_request_log_$->{(20241111..20301010).collect{t ->t.toString().padLeft(8,'0')}}_$->{1..10}
          table-strategy:
            complex:
              sharding-columns: seed,create_time
              sharding-algorithm-name: t_request_log_complex
      sharding-algorithms:
        t_request_log_complex:
          type: CLASS_BASED
          props:
            strategy: COMPLEX
            algorithmClassName: com.trusfort.xdid.config.LogComplexKeysShardingAlgorithm

According to the rules actual-data-nodes,the first table is' t_request_rog_20241111_1'. If this table does not exist, a null pointer exception will be reported when querying。

org.apache.shardingsphere.infra.metadata.database.schema.util.SchemaMetaDataUtil.class

   Optional<DataNode> dataNode = dataNodes.getDataNodes(table).stream().filter((each) -> {
            return isSameDataSourceNameSchemaName(materials, each);
        }).findFirst();

This method will filter the logical table name t_request-log

Because the history table may be deleted, how should we handle it at this time?

@terrymanu
Copy link
Member

What is the version?

@SHEN-Mr
Copy link
Author

SHEN-Mr commented Nov 15, 2024

What is the version?

Version 5.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants