linghengqian commented on issue #32734: URL: https://github.com/apache/shardingsphere/issues/32734#issuecomment-2321571718
> Expressions cannot achieve dynamic tenant splicing - What do you expect from dynamic tenant splicing? I'm curious about the initial documentation references for this type of concept. > Can I not specify actual-data-nodes and directly return the table I specify through the doSharding method of the sharding algorithm, regardless of whether actual-data-nodes exist? - This is a weird rabbit hole from shardingsphere 5.0.x, and there are unit tests that depend on it. Even if `actual-data-nodes` is empty, the custom algorithm can return a table where `actual-data-nodes` is not defined. See https://github.com/apache/shardingsphere/tree/master/test/native/src/test/resources/test-native/yaml . I would say this doesn't seem like best practice. > sharding algorithms are one tenant id and one table, actual-data-nodes cannot be specified because the number is very large - So your idea is actually to have an SPI implementation that can load all the tables of a certain database? Like this? ```yml rules: - !SHARDING tables: t_order_mysql: actualDataNodes: <MYSQL>'localhost:3306', 'test_database', 'my_user', 'user_password' t_order_postgresql: actualDataNodes: <POSTGRESQL>'postgres1:5432', 'test_database', 'postgres', 'mysecretpassword', 'schema_name', 1 t_order_sqlite: actualDataNodes: <SQLITE>'sqlite.db' t_order_hdfs: actualDataNodes: <HDFS>'hdfs://hdfs1:9000/data/path/test', 'name String' ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
