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

date return null when cross dn #3884

Open
Icarus124 opened this issue Jun 18, 2024 · 0 comments
Open

date return null when cross dn #3884

Icarus124 opened this issue Jun 18, 2024 · 0 comments

Comments

@Icarus124
Copy link

  • dble version: 2.19.03
  • preconditions :
    create table datetest(id long) in dn1 and dn2
    create table datetest(id long) in dn3 and dn4
  • configs:
    default
    schema.xml
<table name="datetest" rule="rule_id" dataNode="dn1,dn2"/>
<table name="datetest2" rule="rule_id" dataNode="dn3,dn4"/>

rule.xml

    <tableRule name="rule_id">
        <rule>
            <columns>id</columns>
            <algorithm>hash2</algorithm>
        </rule>
    </tableRule>

    <function name="hashDcar2" class="StringHash">
        <property name="partitionCount">2</property>
        <property name="partitionLength">1</property>
    </function>

server.xml

default

  • steps:
    step1. insert into datetest values(108);
    step2. insert into datetest2 values(108);
    step3. select A.id from datetest A join datetest2 B on A.id = B.id;
    step4. select date(A.id) from datetest A join datetest2 B on A.id = B.id;
  • expect result:
    1.select A.id from datetest A join datetest2 B on A.id = B.id;
    get result A.id = 108
    2.select date(A.id) from datetest A join datetest2 B on A.id = B.id;
    get result 2000-01-08
  • real result:
    1.select A.id from datetest A join datetest2 B on A.id = B.id;
    get result A.id = 108
    2.select date(A.id) from datetest A join datetest2 B on A.id = B.id;
    get result null
  • supplements:
    1.select date(108) in mysql and dble both get 2000-01-08
    guess use date() implement in dble but do not support number like '108'
    but mysql support select date(108)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant