HOT INFO - Dynamic widget works in typesense 0.25.0.rc12

Hello, with the release of typesense 0.25.0.rc12, facet_by: ["*"] works, so the dynamic widget also works! Well, almost, because you probably need to make a slight correction. It executes the query correctly by adding dynamicWidget, but the typesense adapter apparently misinterprets - because it doesn't show 0 number of attributes - and it fetches all of them nicely. Can action be expected on this? Beautiful thanks!
QUERY:

RESPONSE:

It works ! However, apparently the typesense adapter misinterprets and shows 0.

However, I think, looking at the lack of bugs, that it's a small step for you, and a big one for the environment! heh

Thanks for testing this out!
I tried to take a quick stab at this, but I'm not able to get the DynamicWidgets widget to display, even with an Algolia index... I haven't used this widget before, so may be I'm missing something obvious in the configuration.
Could you help me with this? Could you follow the instructions here setup DynamicWidgets using Algolia's demo data and share the working project in a github repo once you get it to work?
I can then update the adapter as needed to make it work in Typesense.

import Head from 'next/head';
import React from 'react';
import TypesenseInstantSearchAdapter from "typesense-instantsearch-adapter";
import { renderToString } from 'react-dom/server';
import {
  DynamicWidgets,
  InstantSearch,
  Hits,
  RefinementList,
  ToggleRefinement,
  InstantSearchSSRProvider,
} from 'react-instantsearch-hooks-web';
import { getServerState } from 'react-instantsearch-hooks-server';
import { createInstantSearchRouterNext } from 'react-instantsearch-hooks-router-nextjs';
import singletonRouter from 'next/router';
import {assembleTypesenseServerConfig} from '../lib/utils'
import { Hit } from "../components/Hit";

const TYPESENSE_SERVER_CONFIG = assembleTypesenseServerConfig()
const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
  server: TYPESENSE_SERVER_CONFIG,
  additionalSearchParameters: {
    // The following parameters are directly passed to Typesense's search API endpoint.
    //  So you can pass any parameters supported by the search endpoint below.
    //  queryBy is required.
    query_by: 'name,categories,description',
    // facet_by: "*"
    // query_by_weights: '4,2,1',
    // // num_typos: 1,
    // typo_tokens_threshold: 1,
    // group_by: "categories",
    // groupLimit: 1
    // pinnedHits: "23:2"
  },
});

export default function HomePage({ serverState, url }) {
  return (
    <InstantSearchSSRProvider {...serverState}>
      <Head>
        <title>React InstantSearch Hooks - Next.js</title>
      </Head>

      <InstantSearch
        searchClient={typesenseInstantsearchAdapter.searchClient}
        indexName="products"
        routing={{
          router: createInstantSearchRouterNext({
            serverUrl: url,
            singletonRouter
            }),

        }}
      >
      <DynamicWidgets facets={["*"]} fallbackComponent={FallbackComponent}></DynamicWidgets>
      <ToggleRefinement
                  className="mt-5"
                  attribute="free_shipping"
                  label="Free Shipping"
                  value={true}
      />
      <Hits hitComponent={Hit}/>
      </InstantSearch>
    </InstantSearchSSRProvider>
  );
}

function FallbackComponent({ attribute }) {
  return (
    <Panel header={attribute}>
      <RefinementList attribute={attribute} />
    </Panel>
  );
}

export async function getServerSideProps({ req }) {
    const protocol = req.headers.referer?.split('://')[0] || 'http';
    const url = `${protocol}://${req.headers.host}${req.url}`;

    const serverState = await getServerState(<HomePage url={url} />, {
      renderToString,
    });

    return {
      props: {
        serverState,
        url,
      },
    };
  };

Example from next.js
You must have server 0.25.0.rc12 from docker hub installed of course. https://hub.docker.com/r/typesense/typesense/tags
And I'm working on data from: https://github.com/typesense/showcase-nextjs-typesense-ecommerce-store
All you have to do is run this script and insert the appropriate data and it will work.

When you click on the toggle after loading, you will see that it sends the appropriate data to typesense and shows no errors. Instead it's just an empty array of arguments all the time in dynamicWidget. But that's a good sign because it's downloading everything - but apparently the adapter isn't getting data from a good place, hence there are 0 items.

Because of the error, it's a minor thing. As the whole thing works, it does not show these attributes, without showing errors of some kind. please take a look :)

I meant to say, could you get the DynamicWidgets working with Algolia, instead of Typesense, in a demo project? I tried the instructions in their official guide and even there the Dynamic Widgets are being rendered as blank...
So if you can give me a project where their instructions render the DynamicWidgets widget in the UI, I can then use that as reference to get it to work with Typesense.

https://www.algolia.com/doc/api-reference/widgets/dynamic-facets/react/?client=widget#examples
https://instantsearchjs.netlify.app/stories/react/?path=/story/dynamicwidgets--default
...

Everything is in the examples.. Just type algolia react dynamicwidget in google.

@jasonbosco here's a working example of DynamicWidgets working with Algolia.
I'm not too familiar with the component myself, but I think the idea is that you define different widgets as children of the DynamicWidgets and they get rendered only when there are results that the widgets would affect. For example try typing in "dog" or "lego" in the SearchBox. For "lego" there's categories and brands displayed, for "dog" only categories, and if it's left empty then there's a few more filters/widgets.

There is no philosophy here. Instantsearch makes a query and I get an array of items which is passed to the dynamicwidget. Will you be updating it? Because it's really a little thing.

I am asking because I am creating a project that will be in many countries and the number of all guys will be even 150+. And at one time, for example, 10. Hence, it needs a dynamicwidget. And it seems to me that it is nice to be able to boast of such a service.

@grinkus-adapt Thank you for sharing that working CodeSandbox. I was able to identify what config changes needed to be done for those widgets to show up.
I've pushed out v2.6.0-0 of the adapter that adds support for dynamicWidgets, when used with Typesense Server v0.25.0.rc12.
Here are instructions on how to configure the adapter to make this work: https://github.com/typesense/typesense-instantsearch-adapter/tree/ts-server-0.25-changes#dynamicwidgets

Thank you on behalf of myself and others. Very quick response. 5+ :) @jasonbosco

It doesn't make sense ... I might as well create a variable. const guy = ["hello", "world"] ...
I expected it to work.
If I set up in Dynamicwidget ["*"], it is to provide currently downloaded from API guy. I gave examples of what the result of downloading from TypeSense looks like. What is done now is completely meaningless. I might as well enter:
guy: {          Order: ["dick"], // << ====== change this as Needed        }, `
And it will also display it.

Modering is just an addition that shows how to sort what comes with API.

By adding to Dynamicwidgets ["*'] API returns all available guys, in the question given. And this should be available in attributes.

Gives an example:
By selecting, for example, HierarchicalMenu - the categories change. Typesense returns only available facets. By which DynamicWidget gets the correct facet attributes. And with every change, they can change too. For example, in the category of jackets - there is no "shoe size" attribute. Which is why it won't show up because the api doesn't return it. Throwing in rigidly makes no sense at all.

I've pushed out an update in v2.6.0-1 that doesn't require you to set renderingContent. But if you want to configure the display order, then you can optionally configure it: https://github.com/typesense/typesense-instantsearch-adapter/tree/ts-server-0.25-changes#dynamicwidgets

@jasonbosco You are doing a good job, I tested and it works as expected. (I tested the main functionality - if I find any problems with sorting, etc. I will let you know) - But what interested me the most works. Thank you!

Great, thank you confirming and thank you again for the great feedback!


vs Oracle<IP_ADDRESS>，Why is HeavyDB6.4 slower?

Prepare data:
The addressinfo table has 30 million records。
sample and extract data from each prefecture and city as randomly as possible from the existing address library. The sample data contains two query criteria of regionid,code.
Test method: execute the query statement for each sample data:
For every 1000 pieces of data processed by select id from addressinfo where regionid='xxx' and code like'% xxx%', record the time of this round: (seconds).
HeavyDB:490 、 557 、 553 、 704 、 941.
Oracle:611 、 470 、 514 、 525 、 544.
Overall, Oracle queries are faster and more stable than HeavyDB.
Other observed conclusions:
If only 1000 pieces of data are repeated five times, the HeavyDB cache works, and the execution time is: 590,20,19,19,20,21.
But the HeavyDB cache didn't work if it was executed five times for 2000 pieces of data, and it was even slower: 5799,1681, 1593, 1705, 1834, 1623.
If you execute an equal query: select id from addressinfo where regionid='xxx' and code = 'xxx', Oracle is 10 times more efficient than HeavyDB.
Why is HeavyDB slower?
What SQL syntax are the advantages of heavydb?
Thanks!

Hi,
We have already discussed this topic in the community forum. To recap, the optimizer generates a plan that requires two LLVM compilations each time the literal in like '%literal%' is changed. This operation is costly, especially when the query is executed against a table with such few records. In other words, the query plan that should be reused is regenerated each time, which is the reason for the slowness, and we are currently investigating the issue.
Running the same query in CPU mode is approximately three times faster. So, even with this problem, it should be faster than Oracle.
Link to the community forum post
If you run the query without a 'like' clause, using two equality filters (e.g. select id from addressinfo where regionid='xxx' and code = 'xxx',) the plan is reused, and recompilation doesn't occur. Consequently, each of the queries is likely to run in 20ms in GPU mode.
I recently executed 100,000 queries, each with a different filter combination, and it took just 2000 seconds on a table with 130 million records on a single GPU. Due to the relatively low number of records used, the GPU usage remained under 30%.
In any case, our database primarily serves analytical processing, excelling in running analytical queries against flat tables or star schemas. Have you ever tried the SSB Benchmark? If you're interested, I can provide you with instructions to set up the tables with data for a Scaling Factor of 100 in just a matter of minutes.

But our actual test results are like the above data, sometimes slower than oracle?
When oracle has an index, the equivalent query is also faster than heavydb.How to explain?
thanks!

Hi,
It's possible that our results differ because we are using different data types in table creation. To facilitate analysis, could you please share the result of SHOW CREATE TABLE addressinfo;, along with the timing results of one or more query executions using the heavysql tool with the timing enabled using the \timing command?"
We expect an output like this
`heavysql> \timing
heavysql> select count(*) from addressinfo;
EXPR$0
30000000
1 rows returned.
Execution time: 32 ms, Total time: 32 ms
heavysql> show create table addressinfo;
Result
CREATE TABLE addressinfo (
id INTEGER NOT NULL,
region TEXT ENCODING DICT(32),
codi TEXT ENCODING NONE);
1 rows returned.
Execution time: 0 ms, Total time: 2 ms
heavysql> select id from addressinfo where region='Harvey County' and codi like '%USEP%';
id
7962700
5358767
[CUTTED RESULTS]
25931749
5769257
384 rows returned.
Execution time: 859 ms, Total time: 860 ms
heavysql> select id from addressinfo where region='Hidalgo County' and codi like '%ARIA%';
id
19169584
4328935
[CUTTED RESULTS]
26109416
13821300
79 rows returned.
Execution time: 21 ms, Total time: 22 ms
heavysql> select id from addressinfo where region='Laurens County' and codi like '%ETRO%';
id
29610690
11444765
[CUTTED RESULTS]
18252423
20872640
247 rows returned.
Execution time: 19 ms, Total time: 20 ms
heavysql> select id from addressinfo where region='Scott County' and codi like '%TTORI%';
id
10207403
10070795
[CUTTED RESULTS]
19785019
7868219
695 rows returned.
Execution time: 19 ms, Total time: 20 ms
heavysql> \memory_summary
HeavyDB Server CPU Memory Summary:
MAX            USE      ALLOCATED           FREE
51316.35 MB      844.79 MB     4096.00 MB     3251.21 MB
HeavyDB Server GPU Memory Summary:
[GPU]            MAX            USE      ALLOCATED           FREE
[0]    10619.69 MB      730.35 MB     4096.00 MB     3365.65 MB
heavysql> \hardware_info
Number of Physical GPUs  :2
Number of CPU core       :24
Number of GPUs allocated :2
Start GPU                :0
Number of SM             :68
Clock frequency          :1508 MHz
Physical GPU Memory      :10 GB
Compute capability       :7.5
===========================================
heavysql> \status
Server Version                      : 7.0.0-20230926-d315676d23
Server Name                         : zion-tr
Server Start Time                   : 2023-10-09 : 14:0:28
`
I've truncated the rows in the result for better post-readability. As you can observe, the initial query takes over 800ms, because load the required columns from disk to CPU/GPU cache (These caches are equivalent to the Buffer Cache section of Oracle's SGA.), and to prepare the execution plan for the statement (just when Oracle saves the execution plan on Shared Pool).
Subsequent queries, while utilizing different filters for regions and codes, reuse the same execution plan from the first query, fetching data from the CPU/GPU Caches.
You can examine and test your queries on my table by restoring a public dump of the table I've shared on an Amazon S3 bucket. You can do this by running the following command in heavysql (or the tool of your choice).
restore table addressinfo_2 from 's3://candidodessanti/addressinfo/addressinfo.dmp.gz' with (s3_region='eu-west-1');
I await receiving the output of the requested commands from your system to assist you better.
Candido.

For reference this is my system
heavysql> \hardware_info
===========================================
Number of CPU core       :24
Number of GPUs allocated :2
Start GPU                :0
-------------------------------------------
Number of SM             :68
Clock frequency          :1508 MHz
Physical GPU Memory      :10 GB
Compute capability       :7.5
-------------------------------------------
===========================================
heavysql> \status
Server Version                      : 7.0.0-20230926-d315676d23
--------------------------------------------------
Server Name                         : zion-tr
Server Start Time                   : 2023-10-09 : 14:0:28

heavysql> show create table addressinfo;
Result
CREATE TABLE ADDRESSINFO (
id TEXT ENCODING DICT(32),
ods_id TEXT ENCODING DICT(32),
code TEXT ENCODING DICT(32),
province TEXT ENCODING DICT(32),
city TEXT ENCODING DICT(32),
regionid TEXT ENCODING DICT(32),
region_name TEXT ENCODING DICT(32),
street_id TEXT ENCODING DICT(32),
street_name TEXT ENCODING DICT(32),
road_id TEXT ENCODING DICT(32),
road_name TEXT ENCODING DICT(32),
number_plate_id TEXT ENCODING DICT(32),
number_plate_name TEXT ENCODING DICT(32),
cpn_id TEXT ENCODING DICT(32),
cpn_code TEXT ENCODING DICT(32),
community_name TEXT ENCODING DICT(32),
premises_network TEXT ENCODING DICT(32),
building_code TEXT ENCODING DICT(32),
building TEXT ENCODING DICT(32),
unit_id TEXT ENCODING DICT(32),
unit TEXT ENCODING DICT(32),
layer_id TEXT ENCODING DICT(32),
layer TEXT ENCODING DICT(32),
room_id TEXT ENCODING DICT(32),
room TEXT ENCODING DICT(32),
rms_code TEXT ENCODING DICT(32),
substation_id TEXT ENCODING DICT(32),
simple_mark TEXT ENCODING DICT(32),
inner_symbol_id TEXT ENCODING DICT(32),
if_inner TEXT ENCODING DICT(32),
switch_no TEXT ENCODING DICT(32),
type INTEGER,
queryindex TEXT ENCODING DICT(32),
remark TEXT ENCODING DICT(32),
alias_name TEXT ENCODING DICT(32),
if_relate TEXT ENCODING DICT(32),
addresstype TEXT ENCODING DICT(32),
source TEXT ENCODING DICT(32),
create_time TIMESTAMP(0),
fldtag TEXT ENCODING DICT(32),
original_company TEXT ENCODING DICT(32),
useremark TEXT ENCODING DICT(32),
village_code TEXT ENCODING DICT(32),
uptimestamp_time TIMESTAMP(0),
create_op TEXT ENCODING DICT(32));
heavysql>
heavysql> \hardware_info
Number of Physical GPUs  :1
Number of CPU core       :32
Number of GPUs allocated :1
Start GPU                :0
Number of SM             :108
Clock frequency          :1376 MHz
Physical GPU Memory      :39 GB
Compute capability       :8.0
heavysql> \status
Server Version                      : 6.4.0-20230201-87f6fa37b4
Server Name                         : node13
Server Start Time                   : 2023-10-07 : 8:29:4
heavysql> \timing
heavysql> select count(*) from addressinfo;
EXPR$0
30748154
1 rows returned.
Execution time: 154 ms, Total time: 155 ms
heavysql> \memory_summary
HeavyDB Server CPU Memory Summary:
MAX            USE      ALLOCATED           FREE
206240.20 MB        0.00 MB        0.00 MB        0.00 MB
HeavyDB Server GPU Memory Summary:
[GPU]            MAX            USE      ALLOCATED           FREE
[0]    39986.00 MB        0.00 MB     4096.00 MB     4096.00 MB
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
1942251114b南四经街104-2号2-1-2
1 rows returned.
Execution time: 7070 ms, Total time: 7072 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路104-2号2-1%';
No rows returned.
Execution time: 3594 ms, Total time: 3595 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路104-2号2-2%';
No rows returned.
Execution time: 2982 ms, Total time: 2984 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路104%';
IDbcode
318808b中山路104号
3659012b中山路104号1楼工行中广支行
2676280b中山路104号-工商银行中山广场支行
3665493b中山路104号1楼工行中广支行
4 rows returned.
Execution time: 3367 ms, Total time: 3368 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-3%';
IDbcode
112121212南四经街104-2号2-1-3
1 rows returned.
Execution time: 2872 ms, Total time: 2874 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-3%';
IDbcode
112121212南四经街104-2号2-1-3
1 rows returned.
Execution time: 33 ms, Total time: 35 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-1%';
IDbcode
1942251113南四经街104-2号2-1-1
1 rows returned.
Execution time: 798 ms, Total time: 799 ms
heavysql> \memory_summary
HeavyDB Server CPU Memory Summary:
MAX            USE      ALLOCATED           FREE
206240.20 MB      351.88 MB     4096.00 MB     3744.12 MB
HeavyDB Server GPU Memory Summary:
[GPU]            MAX            USE      ALLOCATED           FREE
[0]    39986.00 MB      234.59 MB     4096.00 MB     3861.41 MB
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路105%';
IDbcode
1222中山路105号
ssdfdf中山路105甲
2 rows returned.
Execution time: 3305 ms, Total time: 3306 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路105%';
IDbcode
23223中山路105号
23232323中山路105甲
2 rows returned.
Execution time: 30 ms, Total time: 31 ms
heavysql> select count(*) from addressinfo;
EXPR$0
30748154
1 rows returned.
Execution time: 24 ms, Total time: 25 ms
heavysql>

I noticed the TEXT field type. When do I use "encoding dict (32) "or "encoding none"?

We've encountered a sort of bug that was causing the regeneration of the execution plan when using a LIKE filter on a TEXT dictionary-encoded string. This issue has already been addressed in the current master branch and is likely to be included in the next EE/FREE release.
However, for your specific use case, which appears to involve high cardinality strings in the 'code' field, it might be more appropriate to consider using an encoding of 'NONE.'
Additionally, I've noticed that most of your columns use the default encoding size, or in the case of timestamps, no encoding at all. To obtain an 'optimized' Data Definition Language (DDL) for your table, you can use the \o command in heavysql.
Running \o addressinfo will generate a DDL with appropriate encoding sizes for TEXTs and the Timestamp field. You can also review if all ID fields need to be stored as TEXT or can be transformed into numeric data types.
Please note that as of version 7.0, inplace conversion of data types is not yet implemented. Therefore, you'll need to add a new field and perform a massive update on your table, as shown in the code snippet below:
ALTER TABLE addressinfo ADD COLUMN code_ne TEXT ENCODING NONE;
UPDATE addressinfo SET code_ne = code;
ALTER TABLE addressinfo DROP COLUMN code;
ALTER TABLE addressinfo RENAME COLUMN code_ne TO code;

Alternatively, you can simply add the new column and follow the drop-and-rename steps.
In any case, it's advisable to review the data types with the help of the \o command and then populate the new table in the same way you loaded the old version of the table.
Let me know hos is going, and feel free to ask for further assistance (I know that changing from Oracle to other database can be quite hard).
Candido

We've encountered a sort of bug that was causing the regeneration of the execution plan when using a LIKE filter on a TEXT dictionary-encoded string. This issue has already been addressed in the current master branch and is likely to be included in the next EE/FREE release.

We will follow up any progress at any time.Thanks a lot!

The effect is not obvious after using the optimized table field type.
The bug was causing the regeneration of the execution plan when using a LIKE filter on a TEXT dictionary-encoded string.
We will test the lastest
Please see the test record below:
heavyai@node13:~$ heavysql -p admin -db lnlt
User admin connected to database lnlt
heavysql> \version
HeavyDB Server Version: 6.4.0-20230201-87f6fa37b4
heavysql> \t
ADDRESSINFO
SID_AREA
SID_LATN
heavysql> \o addressinfo
CREATE TABLE addressinfo (
id TEXT ENCODING DICT(32),
ods_id TEXT ENCODING DICT(32),
code TEXT ENCODING DICT(32),
province TEXT ENCODING DICT(8),
city TEXT ENCODING DICT(8),
regionid TEXT ENCODING DICT(8),
region_name TEXT ENCODING DICT(8),
street_id TEXT ENCODING DICT(16),
street_name TEXT ENCODING DICT(16),
road_id TEXT ENCODING DICT(32),
road_name TEXT ENCODING DICT(32),
number_plate_id TEXT ENCODING DICT(32),
number_plate_name TEXT ENCODING DICT(32),
cpn_id TEXT ENCODING DICT(32),
cpn_code TEXT ENCODING DICT(32),
community_name TEXT ENCODING DICT(32),
premises_network TEXT ENCODING DICT(32),
building_code TEXT ENCODING DICT(32),
building TEXT ENCODING DICT(32),
unit_id TEXT ENCODING DICT(32),
unit TEXT ENCODING DICT(32),
layer_id TEXT ENCODING DICT(32),
layer TEXT ENCODING DICT(16),
room_id TEXT ENCODING DICT(32),
room TEXT ENCODING DICT(32),
rms_code TEXT ENCODING DICT(32),
substation_id TEXT ENCODING DICT(16),
simple_mark TEXT ENCODING DICT(32),
inner_symbol_id TEXT ENCODING DICT(8),
if_inner TEXT ENCODING DICT(8),
switch_no TEXT ENCODING DICT(16),
type INTEGER ENCODING FIXED(8),
queryindex TEXT ENCODING DICT(32),
remark TEXT ENCODING DICT(16),
alias_name TEXT ENCODING DICT(32),
if_relate TEXT ENCODING DICT(8),
addresstype TEXT ENCODING DICT(8),
source TEXT ENCODING DICT(8),
create_time TIMESTAMP(0) ENCODING FIXED(32),
fldtag TEXT ENCODING DICT(8),
original_company TEXT ENCODING DICT(8),
useremark TEXT ENCODING DICT(8),
village_code TEXT ENCODING DICT(16),
uptimestamp_time TIMESTAMP(0) ENCODING FIXED(32),
create_op TEXT ENCODING DICT(8))
heavysql> CREATE TABLE addressinfo1 (
..> id TEXT ENCODING DICT(32),
..> ods_id TEXT ENCODING DICT(32),
..> code TEXT ENCODING DICT(32),
..> province TEXT ENCODING DICT(8),
..> city TEXT ENCODING DICT(8),
..> regionid TEXT ENCODING DICT(8),
..> region_name TEXT ENCODING DICT(8),
..> street_id TEXT ENCODING DICT(16),
..> street_name TEXT ENCODING DICT(16),
..> road_id TEXT ENCODING DICT(32),
..> road_name TEXT ENCODING DICT(32),
..> number_plate_id TEXT ENCODING DICT(32),
..> number_plate_name TEXT ENCODING DICT(32),
..> cpn_id TEXT ENCODING DICT(32),
..> cpn_code TEXT ENCODING DICT(32),
..> community_name TEXT ENCODING DICT(32),
..> premises_network TEXT ENCODING DICT(32),
..> building_code TEXT ENCODING DICT(32),
..> building TEXT ENCODING DICT(32),
..> unit_id TEXT ENCODING DICT(32),
..> unit TEXT ENCODING DICT(32),
..> layer_id TEXT ENCODING DICT(32),
..> layer TEXT ENCODING DICT(16),
..> room_id TEXT ENCODING DICT(32),
..> room TEXT ENCODING DICT(32),
..> rms_code TEXT ENCODING DICT(32),
..> substation_id TEXT ENCODING DICT(16),
..> simple_mark TEXT ENCODING DICT(32),
..> inner_symbol_id TEXT ENCODING DICT(8),
..> if_inner TEXT ENCODING DICT(8),
..> switch_no TEXT ENCODING DICT(16),
..> type INTEGER ENCODING FIXED(8),
..> queryindex TEXT ENCODING DICT(32),
..> remark TEXT ENCODING DICT(16),
..> alias_name TEXT ENCODING DICT(32),
..> if_relate TEXT ENCODING DICT(8),
..> addresstype TEXT ENCODING DICT(8),
..> source TEXT ENCODING DICT(8),
..> create_time TIMESTAMP(0) ENCODING FIXED(32),
..> fldtag TEXT ENCODING DICT(8),
..> original_company TEXT ENCODING DICT(8),
..> useremark TEXT ENCODING DICT(8),
..> village_code TEXT ENCODING DICT(16),
..> uptimestamp_time TIMESTAMP(0) ENCODING FIXED(32),
..> create_op TEXT ENCODING DICT(8));
heavysql> \t
ADDRESSINFO
SID_AREA
SID_LATN
addressinfo1
heavysql> \timing
heavysql> insert into addressinfo1 select * from ADDRESSINFO;
heavysql> select count(*) from addressinfo1;
EXPR$0
30748154
1 rows returned.
Execution time: 25 ms, Total time: 28 ms
heavysql> \memory_summary
HeavyDB Server CPU Memory Summary:
            MAX            USE      ALLOCATED           FREE
   206240.20 MB     7202.44 MB     8192.00 MB      989.56 MB

HeavyDB Server GPU Memory Summary:
[GPU]            MAX            USE      ALLOCATED           FREE
  [0]    39986.00 MB     6243.21 MB     8192.00 MB     1948.79 MB

heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
1942251114b南四经街104-2号2-1-2
1 rows returned.
Execution time: 35 ms, Total time: 37 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路104-2号2-1%';
No rows returned.
Execution time: 963 ms, Total time: 965 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路104-2号2%';
No rows returned.
Execution time: 365 ms, Total time: 367 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路104-2号2-2%';
No rows returned.
Execution time: 359 ms, Total time: 361 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路104-2号2-3%';
No rows returned.
Execution time: 368 ms, Total time: 369 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路104-2号%';
No rows returned.
Execution time: 361 ms, Total time: 362 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路104%';
IDbcode
315968808b中山路104号
3658459012b辽宁省沈阳和平区工行中广支行中山路104号1楼工行中广支行
2672426280b中山路104号-工商银行中山广场支行
3665333493b辽宁省沈阳和平区工行中广支行中山路104号1楼工行中广支行
4 rows returned.
Execution time: 27 ms, Total time: 29 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-3%';
IDbcode
1942251115b南四经街104-2号2-1-3
1 rows returned.
Execution time: 25 ms, Total time: 26 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-0%';
No rows returned.
Execution time: 1786 ms, Total time: 1787 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2%';
IDbcode
1942251145b南四经街104-2号2-6-4
1942251146b南四经街104-2号2-7-1
1942251147b南四经街104-2号2-7-2
1942251148b南四经街104-2号2-7-3
1942251149b南四经街104-2号2-7-4
1942251134b南四经街104-2号2-4-1
1942251135b南四经街104-2号2-4-2
1942251136b南四经街104-2号2-4-3
1942251137b南四经街104-2号2-4-4
1942251139b南四经街104-2号2-5-2
1942251140b南四经街104-2号2-5-3
1942251141b南四经街104-2号2-5-4
1942251142b南四经街104-2号2-6-1
1942251143b南四经街104-2号2-6-2
1942251144b南四经街104-2号2-6-3
1942251131b南四经街104-2号2-3-2
1942251132b南四经街104-2号2-3-3
1942251133b南四经街104-2号2-3-4
1942251113b南四经街104-2号2-1-1
1942251114b南四经街104-2号2-1-2
1942251115b南四经街104-2号2-1-3
1942251116b南四经街104-2号2-1-4
1942251117b南四经街104-2号2-2-1
1942251118b南四经街104-2号2-2-2
1942251122b南四经街104-2号2-2-3
1942251130b南四经街104-2号2-3-1
1942251128b南四经街104-2号2-2-4
1942251138b南四经街104-2号2-5-1
28 rows returned.
Execution time: 884 ms, Total time: 885 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2%';
IDbcode
1942251133b南四经街104-2号2-3-4
1942251147b南四经街104-2号2-7-2
1942251145b南四经街104-2号2-6-4
1942251148b南四经街104-2号2-7-3
1942251146b南四经街104-2号2-7-1
1942251149b南四经街104-2号2-7-4
1942251131b南四经街104-2号2-3-2
1942251116b南四经街104-2号2-1-4
1942251140b南四经街104-2号2-5-3
1942251115b南四经街104-2号2-1-3
1942251142b南四经街104-2号2-6-1
1942251117b南四经街104-2号2-2-1
1942251132b南四经街104-2号2-3-3
1942251114b南四经街104-2号2-1-2
1942251113b南四经街104-2号2-1-1
1942251139b南四经街104-2号2-5-2
1942251130b南四经街104-2号2-3-1
1942251135b南四经街104-2号2-4-2
1942251144b南四经街104-2号2-6-3
1942251134b南四经街104-2号2-4-1
1942251118b南四经街104-2号2-2-2
1942251122b南四经街104-2号2-2-3
1942251136b南四经街104-2号2-4-3
1942251141b南四经街104-2号2-5-4
1942251137b南四经街104-2号2-4-4
1942251143b南四经街104-2号2-6-2
1942251128b南四经街104-2号2-2-4
1942251138b南四经街104-2号2-5-1
28 rows returned.
Execution time: 881 ms, Total time: 883 ms
heavysql> select ID, code from addressinfo1 where regionid = '210101' and code like '%南四经街104-2号2%';
No rows returned.
Execution time: 25 ms, Total time: 26 ms
heavysql> select ID, code from addressinfo1 where regionid = '210101' and code like '%南四经街104-2号%';
No rows returned.
Execution time: 882 ms, Total time: 883 ms
heavysql> select ID, code from addressinfo1 where regionid = '210101' and code like '%南四经街104%';
No rows returned.
Execution time: 911 ms, Total time: 912 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2%';
IDbcode
1942251133b南四经街104-2号2-3-4
1942251147b南四经街104-2号2-7-2
1942251148b南四经街104-2号2-7-3
1942251149b南四经街104-2号2-7-4
1942251145b南四经街104-2号2-6-4
1942251146b南四经街104-2号2-7-1
1942251131b南四经街104-2号2-3-2
1942251122b南四经街104-2号2-2-3
1942251114b南四经街104-2号2-1-2
1942251116b南四经街104-2号2-1-4
1942251115b南四经街104-2号2-1-3
1942251139b南四经街104-2号2-5-2
1942251140b南四经街104-2号2-5-3
1942251117b南四经街104-2号2-2-1
1942251132b南四经街104-2号2-3-3
1942251144b南四经街104-2号2-6-3
1942251130b南四经街104-2号2-3-1
1942251135b南四经街104-2号2-4-2
1942251118b南四经街104-2号2-2-2
1942251142b南四经街104-2号2-6-1
1942251113b南四经街104-2号2-1-1
1942251136b南四经街104-2号2-4-3
1942251134b南四经街104-2号2-4-1
1942251141b南四经街104-2号2-5-4
1942251137b南四经街104-2号2-4-4
1942251143b南四经街104-2号2-6-2
1942251138b南四经街104-2号2-5-1
1942251128b南四经街104-2号2-2-4
28 rows returned.
Execution time: 28 ms, Total time: 29 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路105%';
IDbcode
316104882b中山路105甲
315989049b中山路105号
2 rows returned.
Execution time: 886 ms, Total time: 888 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路106%';
IDbcode
315996104b中山路106号
3423985106b中山路106号沈阳市公安局03
3665341048b辽宁省沈阳和平区东陵公安局中山路106号1楼东陵公安局
3423985021b中山路106号沈阳市公安局08
3423985094b中山路106号沈阳市公安局04
3423985126b中山路106号沈阳市公安局01
3423985083b中山路106号沈阳市公安局05
3423985071b中山路106号沈阳市公安局06
3423985117b中山路106号沈阳市公安局02
3658460775b辽宁省沈阳和平区东陵公安局中山路106号1楼东陵公安局
3423985057b中山路106号沈阳市公安局07
11 rows returned.
Execution time: 863 ms, Total time: 865 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路104%';
IDbcode
315968808b中山路104号
2672426280b中山路104号-工商银行中山广场支行
3658459012b辽宁省沈阳和平区工行中广支行中山路104号1楼工行中广支行
3665333493b辽宁省沈阳和平区工行中广支行中山路104号1楼工行中广支行
4 rows returned.
Execution time: 823 ms, Total time: 825 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%中山路103%';
IDbcode
316104871b中山路103甲
1 rows returned.
Execution time: 811 ms, Total time: 813 ms
heavysql> \d addressinfo
CREATE TABLE ADDRESSINFO (
  id TEXT ENCODING DICT(32),
  ods_id TEXT ENCODING DICT(32),
  code TEXT ENCODING DICT(32),
  province TEXT ENCODING DICT(32),
  city TEXT ENCODING DICT(32),
  regionid TEXT ENCODING DICT(32),
  region_name TEXT ENCODING DICT(32),
  street_id TEXT ENCODING DICT(32),
  street_name TEXT ENCODING DICT(32),
  road_id TEXT ENCODING DICT(32),
  road_name TEXT ENCODING DICT(32),
  number_plate_id TEXT ENCODING DICT(32),
  number_plate_name TEXT ENCODING DICT(32),
  cpn_id TEXT ENCODING DICT(32),
  cpn_code TEXT ENCODING DICT(32),
  community_name TEXT ENCODING DICT(32),
  premises_network TEXT ENCODING DICT(32),
  building_code TEXT ENCODING DICT(32),
  building TEXT ENCODING DICT(32),
  unit_id TEXT ENCODING DICT(32),
  unit TEXT ENCODING DICT(32),
  layer_id TEXT ENCODING DICT(32),
  layer TEXT ENCODING DICT(32),
  room_id TEXT ENCODING DICT(32),
  room TEXT ENCODING DICT(32),
  rms_code TEXT ENCODING DICT(32),
  substation_id TEXT ENCODING DICT(32),
  simple_mark TEXT ENCODING DICT(32),
  inner_symbol_id TEXT ENCODING DICT(32),
  if_inner TEXT ENCODING DICT(32),
  switch_no TEXT ENCODING DICT(32),
  type INTEGER,
  queryindex TEXT ENCODING DICT(32),
  remark TEXT ENCODING DICT(32),
  alias_name TEXT ENCODING DICT(32),
  if_relate TEXT ENCODING DICT(32),
  addresstype TEXT ENCODING DICT(32),
  source TEXT ENCODING DICT(32),
  create_time TIMESTAMP(0),
  fldtag TEXT ENCODING DICT(32),
  original_company TEXT ENCODING DICT(32),
  useremark TEXT ENCODING DICT(32),
  village_code TEXT ENCODING DICT(32),
  uptimestamp_time TIMESTAMP(0),
  create_op TEXT ENCODING DICT(32));
heavysql> \d addressinfo1
CREATE TABLE addressinfo1 (
  id TEXT ENCODING DICT(32),
  ods_id TEXT ENCODING DICT(32),
  code TEXT ENCODING DICT(32),
  province TEXT ENCODING DICT(8),
  city TEXT ENCODING DICT(8),
  regionid TEXT ENCODING DICT(8),
  region_name TEXT ENCODING DICT(8),
  street_id TEXT ENCODING DICT(16),
  street_name TEXT ENCODING DICT(16),
  road_id TEXT ENCODING DICT(32),
  road_name TEXT ENCODING DICT(32),
  number_plate_id TEXT ENCODING DICT(32),
  number_plate_name TEXT ENCODING DICT(32),
  cpn_id TEXT ENCODING DICT(32),
  cpn_code TEXT ENCODING DICT(32),
  community_name TEXT ENCODING DICT(32),
  premises_network TEXT ENCODING DICT(32),
  building_code TEXT ENCODING DICT(32),
  building TEXT ENCODING DICT(32),
  unit_id TEXT ENCODING DICT(32),
  unit TEXT ENCODING DICT(32),
  layer_id TEXT ENCODING DICT(32),
  layer TEXT ENCODING DICT(16),
  room_id TEXT ENCODING DICT(32),
  room TEXT ENCODING DICT(32),
  rms_code TEXT ENCODING DICT(32),
  substation_id TEXT ENCODING DICT(16),
  simple_mark TEXT ENCODING DICT(32),
  inner_symbol_id TEXT ENCODING DICT(8),
  if_inner TEXT ENCODING DICT(8),
  switch_no TEXT ENCODING DICT(16),
  type INTEGER ENCODING FIXED(8),
  queryindex TEXT ENCODING DICT(32),
  remark TEXT ENCODING DICT(16),
  alias_name TEXT ENCODING DICT(32),
  if_relate TEXT ENCODING DICT(8),
  addresstype TEXT ENCODING DICT(8),
  source TEXT ENCODING DICT(8),
  create_time TIMESTAMP(0) ENCODING FIXED(32),
  fldtag TEXT ENCODING DICT(8),
  original_company TEXT ENCODING DICT(8),
  useremark TEXT ENCODING DICT(8),
  village_code TEXT ENCODING DICT(16),
  uptimestamp_time TIMESTAMP(0) ENCODING FIXED(32),
  create_op TEXT ENCODING DICT(8));
heavysql> alter table addressinfo rename to addressinfo_old
..> ;
heavysql> alter table addressinfo1 rename to addressinfo;
heavysql> \t
addressinfo_old
SID_AREA
SID_LATN
addressinfo
heavysql> \d addressinfo
CREATE TABLE addressinfo (
  id TEXT ENCODING DICT(32),
  ods_id TEXT ENCODING DICT(32),
  code TEXT ENCODING DICT(32),
  province TEXT ENCODING DICT(8),
  city TEXT ENCODING DICT(8),
  regionid TEXT ENCODING DICT(8),
  region_name TEXT ENCODING DICT(8),
  street_id TEXT ENCODING DICT(16),
  street_name TEXT ENCODING DICT(16),
  road_id TEXT ENCODING DICT(32),
  road_name TEXT ENCODING DICT(32),
  number_plate_id TEXT ENCODING DICT(32),
  number_plate_name TEXT ENCODING DICT(32),
  cpn_id TEXT ENCODING DICT(32),
  cpn_code TEXT ENCODING DICT(32),
  community_name TEXT ENCODING DICT(32),
  premises_network TEXT ENCODING DICT(32),
  building_code TEXT ENCODING DICT(32),
  building TEXT ENCODING DICT(32),
  unit_id TEXT ENCODING DICT(32),
  unit TEXT ENCODING DICT(32),
  layer_id TEXT ENCODING DICT(32),
  layer TEXT ENCODING DICT(16),
  room_id TEXT ENCODING DICT(32),
  room TEXT ENCODING DICT(32),
  rms_code TEXT ENCODING DICT(32),
  substation_id TEXT ENCODING DICT(16),
  simple_mark TEXT ENCODING DICT(32),
  inner_symbol_id TEXT ENCODING DICT(8),
  if_inner TEXT ENCODING DICT(8),
  switch_no TEXT ENCODING DICT(16),
  type INTEGER ENCODING FIXED(8),
  queryindex TEXT ENCODING DICT(32),
  remark TEXT ENCODING DICT(16),
  alias_name TEXT ENCODING DICT(32),
  if_relate TEXT ENCODING DICT(8),
  addresstype TEXT ENCODING DICT(8),
  source TEXT ENCODING DICT(8),
  create_time TIMESTAMP(0) ENCODING FIXED(32),
  fldtag TEXT ENCODING DICT(8),
  original_company TEXT ENCODING DICT(8),
  useremark TEXT ENCODING DICT(8),
  village_code TEXT ENCODING DICT(16),
  uptimestamp_time TIMESTAMP(0) ENCODING FIXED(32),
  create_op TEXT ENCODING DICT(8));
heavysql> \o addressinfo
CREATE TABLE addressinfo (
id TEXT ENCODING DICT(32),
ods_id TEXT ENCODING DICT(32),
code TEXT ENCODING DICT(32),
province TEXT ENCODING DICT(8),
city TEXT ENCODING DICT(8),
regionid TEXT ENCODING DICT(8),
region_name TEXT ENCODING DICT(8),
street_id TEXT ENCODING DICT(16),
street_name TEXT ENCODING DICT(16),
road_id TEXT ENCODING DICT(32),
road_name TEXT ENCODING DICT(32),
number_plate_id TEXT ENCODING DICT(32),
number_plate_name TEXT ENCODING DICT(32),
cpn_id TEXT ENCODING DICT(32),
cpn_code TEXT ENCODING DICT(32),
community_name TEXT ENCODING DICT(32),
premises_network TEXT ENCODING DICT(32),
building_code TEXT ENCODING DICT(32),
building TEXT ENCODING DICT(32),
unit_id TEXT ENCODING DICT(32),
unit TEXT ENCODING DICT(32),
layer_id TEXT ENCODING DICT(32),
layer TEXT ENCODING DICT(16),
room_id TEXT ENCODING DICT(32),
room TEXT ENCODING DICT(32),
rms_code TEXT ENCODING DICT(32),
substation_id TEXT ENCODING DICT(16),
simple_mark TEXT ENCODING DICT(32),
inner_symbol_id TEXT ENCODING DICT(8),
if_inner TEXT ENCODING DICT(8),
switch_no TEXT ENCODING DICT(16),
type INTEGER ENCODING FIXED(8),
queryindex TEXT ENCODING DICT(32),
remark TEXT ENCODING DICT(16),
alias_name TEXT ENCODING DICT(32),
if_relate TEXT ENCODING DICT(8),
addresstype TEXT ENCODING DICT(8),
source TEXT ENCODING DICT(8),
create_time TIMESTAMP(0) ENCODING FIXED(32),
fldtag TEXT ENCODING DICT(8),
original_company TEXT ENCODING DICT(8),
useremark TEXT ENCODING DICT(8),
village_code TEXT ENCODING DICT(16),
uptimestamp_time TIMESTAMP(0) ENCODING FIXED(32),
create_op TEXT ENCODING DICT(8))
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路106%';
IDbcode
315996104b中山路106号
3423985106b中山路106号沈阳市公安局03
3665341048b辽宁省沈阳和平区东陵公安局中山路106号1楼东陵公安局
3423985021b中山路106号沈阳市公安局08
3423985094b中山路106号沈阳市公安局04
3423985126b中山路106号沈阳市公安局01
3423985083b中山路106号沈阳市公安局05
3423985071b中山路106号沈阳市公安局06
3423985117b中山路106号沈阳市公安局02
3658460775b辽宁省沈阳和平区东陵公安局中山路106号1楼东陵公安局
3423985057b中山路106号沈阳市公安局07
11 rows returned.
Execution time: 26 ms, Total time: 28 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路107%';
No rows returned.
Execution time: 3219 ms, Total time: 3220 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路100%';
IDbcode
315968798b中山路100号
1 rows returned.
Execution time: 858 ms, Total time: 859 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路100%';
IDbcode
315968798b中山路100号
1 rows returned.
Execution time: 26 ms, Total time: 27 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路101%';
IDbcode
316141775b中山路101甲
1 rows returned.
Execution time: 801 ms, Total time: 802 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路101';
No rows returned.
Execution time: 489 ms, Total time: 491 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路101';
No rows returned.
Execution time: 22 ms, Total time: 22 ms
heavysql> \q
User admin disconnected from database lnlt
heavyai@node13:~$ exit
logout
root@node13:~/heavydb/build-package# systemctl stop heavydb
root@node13:~/heavydb/build-package# systemctl start heavydb
root@node13:~/heavydb/build-package# su - heavyai
heavyai@node13:~$ heavysql -p admin -db lnlt
User admin connected to database lnlt
heavysql> \t
addressinfo_old
SID_AREA
SID_LATN
addressinfo
heavysql> \timing
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路101';
No rows returned.
Execution time: 4512 ms, Total time: 4631 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路101%';
IDbcode
......
1 rows returned.
Execution time: 838 ms, Total time: 904 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路101%';
IDbcode
......
1 rows returned.
Execution time: 32 ms, Total time: 86 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路100%';
IDbcode
......
1 rows returned.
Execution time: 835 ms, Total time: 906 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路100%';
IDbcode
......
1 rows returned.
Execution time: 33 ms, Total time: 34 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路101%';
IDbcode
......
1 rows returned.
Execution time: 34 ms, Total time: 35 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
......-2号2-1-2
1 rows returned.
Execution time: 803 ms, Total time: 804 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路104-2号2-1%';
No rows returned.
Execution time: 802 ms, Total time: 803 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路104%';
IDbcode
......
4 rows returned.
Execution time: 796 ms, Total time: 798 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-3%';
IDbcode
......-2号2-1-3
1 rows returned.
Execution time: 884 ms, Total time: 885 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-3%';
IDbcode
......
1 rows returned.
Execution time: 36 ms, Total time: 36 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-1%';
IDbcode
......
1 rows returned.
Execution time: 852 ms, Total time: 854 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路105%';
IDbcode
......
2 rows returned.
Execution time: 983 ms, Total time: 984 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%中山路105%';
IDbcode
......
2 rows returned.
Execution time: 29 ms, Total time: 30 ms
heavysql> select count(*) from addressinfo;
EXPR$0
30748154
1 rows returned.
Execution time: 285 ms, Total time: 286 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路102';
No rows returned.
Execution time: 29 ms, Total time: 30 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路103';
No rows returned.
Execution time: 29 ms, Total time: 30 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路104';
No rows returned.
Execution time: 25 ms, Total time: 26 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路105';
No rows returned.
Execution time: 32 ms, Total time: 33 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路';
No rows returned.
Execution time: 29 ms, Total time: 30 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code = '中山路105甲';
IDbcode
......
1 rows returned.
Execution time: 28 ms, Total time: 29 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-1%';
IDbcode
......
58 rows returned.
Execution time: 4733 ms, Total time: 4737 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2%';
IDbcode
。。。。。。
77 rows returned.
Execution time: 4440 ms, Total time: 4443 ms
heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-1%';
IDbcode
......
58 rows returned.
Execution time: 33 ms, Total time: 36 ms

heavysql> \memory_summary
HeavyDB Server CPU Memory Summary:
            MAX            USE      ALLOCATED           FREE
   206240.20 MB      263.91 MB     4096.00 MB     3832.09 MB

HeavyDB Server GPU Memory Summary:
[GPU]            MAX            USE      ALLOCATED           FREE
  [0]    39986.00 MB      146.62 MB     4096.00 MB     3949.38 MB

heavysql> \status
Server Version                      : 6.4.0-20230201-87f6fa37b4
--------------------------------------------------
Server Name                         : node13
Server Start Time                   : 2023-10-11 : 1:41:43

heavysql> \hardware_info
===========================================
Number of Physical GPUs  :1
Number of CPU core       :32
Number of GPUs allocated :1
Start GPU                :0
-------------------------------------------
Number of SM             :108
Clock frequency          :1376 MHz
Physical GPU Memory      :39 GB
Compute capability       :8.0
-------------------------------------------

===========================================
heavysql>

Hello,
I apologize if I haven't been clear enough regarding the changes to the data types.
To achieve optimal performance, it is necessary to change the data type of the 'code' column from TEXT ENCODED DICT(32) to TEXT ENCODING NONE.
To do this in version 6.4.4, you have two options:

Recreate the table, modifying the 'code' column's data type, and then run an ITAS, just as you did after the optimization.
Execute the following SQL statements.

ALTER TABLE addressinfo ADD COLUMN code_temp TEXT ENCODING NONE;
UPDATE addressinfo SET code_temp = code;
ALTER TABLE addressinfo DROP COLUMN code;
ALTER TABLE addressinfo RENAME COLUMN code_temp TO code;

Changing the table is this way, queries using 'LIKE' should now run in approximately 20 milliseconds. Please note that the effective runtime will be very low due to the small number of records, but a few milliseconds are required by the parser.
Best Regards,
Candido

It is indeed faster to change text encoding to none.

The bug problem mentioned earlier was solved in master branch, but we tried to compile and test the latest code and found that bug didn't fix it???

heavysql> \version
HeavyDB Server Version: 7.1.0dev-20231011-72c90bc290

heavysql> \d addressinfo1
CREATE TABLE ADDRESSINFO1 (
  id TEXT ENCODING DICT(32),
  ods_id TEXT ENCODING DICT(32),
  code TEXT ENCODING DICT(32),
  province TEXT ENCODING DICT(32),
  city TEXT ENCODING DICT(32),
  regionid TEXT ENCODING DICT(32),
  region_name TEXT ENCODING DICT(32),
  street_id TEXT ENCODING DICT(32),
  street_name TEXT ENCODING DICT(32),
  road_id TEXT ENCODING DICT(32),
  road_name TEXT ENCODING DICT(32),
  number_plate_id TEXT ENCODING DICT(32),
  number_plate_name TEXT ENCODING DICT(32),
  cpn_id TEXT ENCODING DICT(32),
  cpn_code TEXT ENCODING DICT(32),
  community_name TEXT ENCODING DICT(32),
  premises_network TEXT ENCODING DICT(32),
  building_code TEXT ENCODING DICT(32),
  building TEXT ENCODING DICT(32),
  unit_id TEXT ENCODING DICT(32),
  unit TEXT ENCODING DICT(32),
  layer_id TEXT ENCODING DICT(32),
  layer TEXT ENCODING DICT(32),
  room_id TEXT ENCODING DICT(32),
  room TEXT ENCODING DICT(32),
  rms_code TEXT ENCODING DICT(32),
  substation_id TEXT ENCODING DICT(32),
  simple_mark TEXT ENCODING DICT(32),
  inner_symbol_id TEXT ENCODING DICT(32),
  if_inner TEXT ENCODING DICT(32),
  switch_no TEXT ENCODING DICT(32),
  type INTEGER,
  queryindex TEXT ENCODING DICT(32),
  remark TEXT ENCODING DICT(32),
  alias_name TEXT ENCODING DICT(32),
  if_relate TEXT ENCODING DICT(32),
  addresstype TEXT ENCODING DICT(32),
  source TEXT ENCODING DICT(32),
  create_time TIMESTAMP(0),
  fldtag TEXT ENCODING DICT(32),
  original_company TEXT ENCODING DICT(32),
  useremark TEXT ENCODING DICT(32),
  village_code TEXT ENCODING DICT(32),
  uptimestamp_time TIMESTAMP(0),
  create_op TEXT ENCODING DICT(32));
heavysql> \memory_summary
HeavyDB Server CPU Memory Summary:
            MAX            USE      ALLOCATED           FREE
   206240.20 MB     5085.15 MB     8192.00 MB     3106.85 MB

HeavyDB Server GPU Memory Summary:
[GPU]            MAX            USE      ALLOCATED           FREE
  [0]    39986.00 MB     1303.73 MB     4096.00 MB     2792.27 MB

heavysql> select ID, code from addressinfo where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
....-2号2-1-2
1 rows returned.
Execution time: 31 ms, Total time: 33 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
....-2号2-1-2
1 rows returned.
Execution time: 920 ms, Total time: 922 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1-3%';
IDbcode
....-2号2-1-3
1 rows returned.
Execution time: 838 ms, Total time: 840 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
....-2号2-1-2
1 rows returned.
Execution time: 23 ms, Total time: 25 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1-4%';
IDbcode
....-2号2-1-4
1 rows returned.
Execution time: 768 ms, Total time: 770 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1-5%';
No rows returned.
Execution time: 744 ms, Total time: 745 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1-2%';
IDbcode
....-.-1-2
1 rows returned.
Execution time: 23 ms, Total time: 25 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-1%';
IDbcode
....-4
4 rows returned.
Execution time: 794 ms, Total time: 796 ms

heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-2%';
IDbcode
....-4
4 rows returned.
Execution time: 818 ms, Total time: 821 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code like '%南四经街104-2号2-3%';
IDbcode
....4
4 rows returned.
Execution time: 824 ms, Total time: 826 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code = '南四经街104-2号2-1-2';
IDbcode
....1 rows returned.
Execution time: 594 ms, Total time: 596 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code = '南四经街104-2号2-1-2';
IDbcode
....-2号2-1-2
1 rows returned.
Execution time: 19 ms, Total time: 21 ms
heavysql> select ID, code from addressinfo1 where regionid = '210102' and code = '南四经街104-2号2-1-1';
IDbcode
......
1 rows returned.
Execution time: 17 ms, Total time: 19 ms

In response to your questions:

The bug problem mentioned earlier was solved in master branch, but we tried to compile and test the latest code and found that bug didn't fix it???

It's included in the master branch of out internal repository, waiting to be included in an upcoming release of the software.

When should text encoding dictionary be changed to none?
Text encoding with a dictionary is generally preferable for several reasons:

Memory Efficiency: Using dictionary encoding typically consumes less memory than the NONE encoding. For example, consider a table with a billion records and a "Country" field. Assuming there are fewer than 255 unique countries worldwide, with dictionary encoding, only one byte is required to store each country. This results in significant memory and disk savings.
Grouping Efficiency: Depending on the hash algorithm used, the index value can be employed for grouping without the need for additional hashing, which can enhance performance.
Query Efficiency: When used in WHERE conditions, only a set of distinct values needs to be scanned. Operations like equality checks, pattern matching (e.g., LIKE), and others are performed on the dictionary, reducing the search space from a billion to just a few hundred strings. Subsequent matching indexes are then compared as numbers, improving query performance.

When is NONE encoding preferred?
DICTIONARY encoding is generally less suitable in the following scenarios:

High Cardinality: When the cardinality of the TEXT in the tables is exceptionally high, dictionary encoding may become an overhead rather than an advantage.
Large Text Fields: If the TEXT content in the fields exceeds 32K in size, using NONE encoding is recommended, as dictionary encoding may not be practical in such cases.

I hope this clarifies the considerations for choosing between DICTIONARY and NONE encoding for text data. If you have any further questions or need additional information, please feel free to ask.
Candido

The answer is very very clear, Thank you very very much!

In response to your questions:

The bug problem mentioned earlier was solved in the master branch, but we tried to compile and test the latest code and found that the bug didn't fix it???

It's included in the master branch of our internal repository, waiting to be included in an upcoming software release.

When should text encoding dictionary be changed to none?

Text encoding with a dictionary is generally preferable for several reasons:

Memory Efficiency: Dictionary encoding typically consumes less memory than NONE encoding. For example, consider a table with a billion records and a "Country" field. Assuming there are fewer than 255 unique countries worldwide, with dictionary encoding, only one byte is required to store each country. This results in significant memory and disk savings.
Grouping Efficiency: Depending on the hash algorithm used, the index value can be employed for grouping without additional hashing, enhancing performance.
Query Efficiency: Only a set of distinct values needs to be scanned when used in WHERE conditions. Operations like equality checks, pattern matching (e.g., LIKE), and others are performed on the dictionary, reducing the search space from a billion to just a few hundred strings. Subsequent matching indexes are then compared as numbers, improving query performance.

When is NONE encoding preferred?
DICTIONARY encoding is generally less suitable in the following scenarios:

High Cardinality: When the cardinality of the TEXT in the tables is exceptionally high, dictionary encoding may become an overhead rather than an advantage.
Large Text Fields: If the TEXT content in the fields exceeds 32K in size, using NONE encoding is recommended, as dictionary encoding may not be practical in such cases.

I hope this helps clear up the considerations for choosing between DICTIONARY and NONE encoding for text data. If you have any more questions or need additional information, please don't hesitate to ask.
Candido


Do not crash on tid == -1 in sys_thr_set_name

Previous implementation thought of tid == -1 but it crashed on unwrapping the conversion to i32. This is called by system app ShellAppProxy

I told VocalFan to merge this, because it's already done this way in sys_cpuset_getaffinity


Remove unused Import Settings in JSON that cause errors decoding JSON

Resolves Nightscout CGM Import Settings fails with error by:

Removing unused fields from the JSON struct which do not get saved or written to settings/pump.  These unused fields used Types that were inconsistent with Loop JSON.
Checks if JSON Profile was entered by Loop to ensure proper Default record is loaded.

Thanks for your contribution. The changes look good, but I am not overly familiar with these details, and don’t have other looping data to test from.
Hoping someone with fresh profile data uploaded to NS from both Loop and AAPS will have a chance to test. Import of manual NS profile entries would also be good to test here.

And maybe we need to make a separate PR for this?

My only suggestion to consider is maybe setting target to the middle of the target range from Loop rather than the bottom target, since Trio only uses a single target.

@kskandis are you also up for that?

And possibly AAPS-generated profiles? @t1dude ?

Could someone also quickly check that NS-generated profiles are also imported correctly?

I got to test this now, and can confirm that changes made from the NS profile editor are correctly imported. For target, only the lower bound is imported, the upper bound is ignored, as noted by others above.
For me this is LGTM. Would be interesting to know if AAPS profiles are supported too, but that’s a little out of scope for this PR.

I will merge this with 4 approvals and 4 testers.
@t1dude if you could please test this with AAPS-uploaded profiles after the fact; if a fix for AAPS-profiles is necessary, we will record this as a new issue ticket.
@MikePlante1 comment regarding not using just the lower bound of Loop's correction range can be handled via #252 .
Thank you everyone for testing and reviewing. Thank you @kskandis for your contribution to Trio.

And maybe we need to make a separate PR for this?

My only suggestion to consider is maybe setting target to the middle of the target range from Loop rather than the bottom target, since Trio only uses a single target.

@kskandis are you also up for that?

That makes sense to me.  Yes, I'll look into it.


Device name is blank on new iOS devices

I just started using E2E on iOS for the first time, but the Device created for my phone came with a blank device name, rather than the one we already know about for managing push targets etc

Fixed by https://github.com/matrix-org/matrix-ios-sdk/commit/ce44482e174425f8abb3885854c0d6863fb6802d


home page animation

I need to get you a pano to use on the HP. I don't want to use the one from the title card. It's too dark. But feel free to use it for prototyping.

Hallett: http://apps.npr.org/dailygraphics/graphics/homepage-pano-20160718/
Moraine: http://apps.npr.org/dailygraphics/graphics/homepage-pano-20160719/


Initial publishing of application identity specification

Asked community members (Paul Bernier specifically) to review it and make sure it was in line with their current understanding of the scheme and got the okay. Merging now


⚠ Bofrost.at has degraded performance

In b673bbe, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 3703 ms

Resolved: Bofrost.at performance has improved in 8cfb92e after 11 minutes.


add gender randomizer

Hi @tk-sugumar, it won't be a good idea to merge all of these in the repository. It would be better to make a pip library out of it in a separate repository and call only the relevant parts here. @AbinayaM02 thoughts

Agreed. Like @kaustubhdhole mentioned, you should be installing the library (specify it in the reuirements.txt) and use it for your transformation @tk-sugumar. You can check if the library works fine for python 3.7.


Upgarde apache http client v4.5 -> v5.0

From official docs

HttpClient 5.0.x branch is considered stable and production ready. It is being actively maintained and supported.
Users of all versions of HttpClient are advised to upgrade to the latest release of the 5.0 series.

Seems like we are stuck on this till spring provides httpclient 5 compatible request factory, eg.: https://stackoverflow.com/questions/61210545/how-to-set-spring-httpcomponentsclienthttprequestfactory-with-apache-httpcompone


Add except() function

Useful when you want to get all of the things in an array except
specific values.

@ameech CR?

:+1:


Update links in issue templates to point to OLS4

In the cell-ontology repo, issue templates currently include links to OLS that direct to OLS3.
For example, the new term template has:
Note - please check that the term does not already exist (check OLS: https://www.ebi.ac.uk/ols/ontologies/cl)
This should be updated to:
Note - please check that the term does not already exist. Check OLS: https://www.ebi.ac.uk/ols4/ontologies/cl.

General cosmetic edits will be made to other CL issue templates In the associated PR.


Fix breaking changes in 3.4

Haven’t run the tests - fully expect some of them to break

:white_check_mark: Build chrome-extension 1.0.69 completed (commit https://github.com/bluefin-octopusdeploy/chrome-extension/commit/f17d97777f by @matt-richardson)

:white_check_mark: Build chrome-extension 1.0.70 completed (commit https://github.com/bluefin-octopusdeploy/chrome-extension/commit/7297077f39 by @matt-richardson)

Interestingly, https://ci.appveyor.com/project/BluefinOctopusDeploy/chrome-extension/build/1.0.70 says it passed, but it fell over as it couldn't find common.ps1.
I think this is ready to merge now though.

Okay, I'll try to take a look in the next couple of days. Thank you very
much for your help.
On Sep 23, 2016 7:14 AM, "Matt Richardson"<EMAIL_ADDRESS>wrote:

Haven’t run the tests - fully expect some of them to break
You can view, comment on, or merge this pull request online at:
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71
Commit Summary

Handle breaking change in 3.4 for clone step
Change close button to an x
Add my twitter handle

File Changes

A src/3.0/background/octopus-version-handler.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-0
(35)
M src/3.0/background/pygmy.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-1
(1)
M src/3.0/edit-step-as-json.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-2
(19)
M src/3.0/pygmy.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-3
(34)
M src/3.0/view-release-deployment-process.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-4
(10)
M src/3.0/view-resultant-variable-list.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-5
(5)
M src/commonpygmy.js
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-6
(33)
M src/manifest.json
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-7
(3)
M src/options.html
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71/files#diff-8
(3)

Patch Links:

https://github.com/bluefin-octopusdeploy/chrome-
extension/pull/71.patch
https://github.com/bluefin-octopusdeploy/chrome-
extension/pull/71.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bluefin-octopusdeploy/chrome-extension/pull/71, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAiaSo93mUeibuJTvNCd3gSpltfwURCyks5qs8KRgaJpZM4KE6ZQ
.


Auth token handling improvements

I'm running into an issue with auth token handling that hopefully I can explain.
My understanding of Bluesky auth

A user handle + app password creates a new session, which provides an access token and refresh token.
The access token expires in 2 hours. To refresh it you use the refresh token.
The refresh token expires in 2 months. To refresh it you use the handle + app password to create a new session again.

How atproto handles this
atproto handles scenario 1 and 2, but does not handle scenario 3. _should_refresh_session will check if the access token is nearly expired, and if so, will refresh the access token using the refresh token. However, atproto does not check if the refresh token is expired and handle refreshing it.
Right now Client.login() accepts either the handle/password or the session string, but not both. If the session string is passed then the handle/password are ignored.
My request

Change auth to handle both access token refreshing and refresh token refreshing.
2. That will mean checking that both tokens are not expired. If the access token is expired then it is refreshed with the refresh token. If the refresh token is expired then it is refreshed using the username/password via CreateSession (assuming that the handle/password are passed into Client.login).
Add some sort of callback functionality when a token is refreshed by _refresh_and_set_session. This will allow me to know when the session string has changed so I can store it in the database and use it in the future when creating new Clients. Otherwise I have to call export_session_string after every atproto method because I don't know which one may have created a new session.

Hi! Awesome description!

I have a plan to provide a callback on token refresh to be able to save it in any external storage because the current implementation is not obvious when you should export the session string. But now you documented my thoughts xd. Thank you!

Updating the refresh token after few months by login and password is not what SDK want to provide. Because it will require saving a password in memory/somewhere. Not a secure way. And there is a global question. If your script didn't work with a token for more than 2 months should you still have access to the account or not? I mean refresh token will expire only if you don't use it. For each new token refreshes, the refresh token will be updated. Correct me if I'm wrong. I'm okay to provide some API that will help to catch this case from users end. So you should store the password somewhere in a somewhat encrypted format and SDK will request it on demand. Sounds like one more callback. Wdyt?

I think as long as clients are storing handles and app passwords in an encrypted manner then it is fine. For some apps, like Postpone, our only choice is to store this information, otherwise a user would have to log into their Bluesky account every 2 months or else our connection would break.

Updating the refresh token after few months by login and password is not what SDK want to provide. Because it will require saving a password in memory/somewhere. Not a secure way.

Saving the session string in memory is nearly as unsafe as storing passwords, because it provides unfettered access to an account for up to 2 months. So both handle/password and session strings/tokens should be encrypted by clients if they are stored for long-term use.
I don't think the SDK needs to request it on demand, no. I think it's up to the user of the client to encrypt the handle, password, and session string and pass them to the Client every time.
In pseudocode, I think it would look something like this:
def login(self, login, password, session_string):
    if session_string:
        if is_refresh_token_expired(session_string) and login and password:
            session = refresh_refresh_token(login, password)
        elif is_access_token_expired(session_string):
            session = refresh_access_token(session_string)
        else:
            raise ValueError('Cannot refresh session')
    elif login and password:
        session = create_session(login, password)
    else:
        raise ValueError('Either session_string or login and password should be provided.')

    self.me = self.get_profile()
    return self.me

Ah, sure. We can update the token on login(). I thought about the Client() instance that will work for a few months

Btw why instead of storing passwords you can't perform some “check” request 1 per month to update the refresh token?

Yeah, that is definitely something we can do, especially if the API for SessionString is stable.
In that case we can store the session string and every time before creating the client we can check if the refresh token is about to expire. If so, use the stored handle/password instead of the session string to create a new session.
It would be nice if the client could handle this automatically, but as long as the API for session string is stable it should be fine for client users to handle it instead.

I mean don't store password at all. Or it's not possible to update expiration date of refresh token by requesting a new one?

Ah, gotcha! My understanding is that the only way to request a new refresh token is via handle and app password.
So refresh tokens generate new access tokens, and handle + password generates new refresh tokens.
Unless refreshing access tokens also provides a new refresh token with a new expiration, in which case this entire GitHub issue can be ignored. 😂 Sounds like I need to do some more exploring.

I have confirmed that refreshing a token via refreshSession does also provide a new refresh token with an extended expiration date. 🤦
So in that case, Postpone does not need to store app username/password, and instead we can only store the session string.
It still would be nice to have some sort of callback handler for when a new session string is generated so we can store that in the DB, however it won't be too tricky for us to handle that ourselves anyway.
Sorry for all the trouble!

Awesome! Callback will be provided pretty soon

Thank you! I really appreciate all you're doing for Bluesky Python development. 🙏


how to integrate jest with pactum coverage

I was trying to perform the code coverage on the Api specification, but giving all the apis  even if run for  one api .

@karishma1911 Thanks for reporting. @leelaprasadv will investigate this further.

Similar to Issue: https://github.com/pactumjs/pactum-swagger-coverage/issues/6
Will be fixed with PR https://github.com/pactumjs/pactum-swagger-coverage/pull/7


Custom domain url for identity server

Thanks for making this awesome package.
We are having setup where Angular communicates with identity server4 and it works well.
Now we want to add support for custom domain and because of that identity server url might be anything, for example account.google.com
We can set identity server url using below in oauthconfig file
// Url of the Identity Provider
issuer: 'https://steyer-identity-server.azurewebsites.net/identity',
But it is static link, is there any way to support dynamic(custom domain) url for identity server within ouath config file?
For example if the tenant has custom domain as google.com:
'https://account.google.com/identity'
and if the tenant has custom domain as microsoft.com:
'https://account.microsoft.com/identity'
Thanks in advance

Could you show the code for how you bootstrap the library? Everything depends on that.
If you take my sample repository, I provide the AuthConfig object runtime. Mine is a static object, but you can replace it with a runtime value.
Note that even though different Identity Servers should be 'compatible' in their support of OpenID flows, in practice they have subtle differences requiring different configurations and usages of this library. You'd have to implement and test compatibility with any type of IDS you wish to provide.

@jeroenheijmans - Thanks for the answer. I have written a SO question, if you can help? https://stackoverflow.com/questions/56908120/setting-custom-domain-using-angular-oauthservice-and-identity-server-4

I see you got some response on SO too. Since things went quiet some time ago, I'd assume we can close this question for now. Feel free to open a new issue if you've found a bug, or as a question on SO if you get stuck somewhere in implementation!


Improve usability

A somewhat trivial pull request to make working with the project a bit easier as I get acquainted with the system. Finally got it to build…
(FYI: it's PT_TRACE_ME on Darwin; that was an oversight on my part when I left that comment)
Update: this also fixes another big annoyance, #32.

Sorry could you please upload an ipa for us to test? Thanks a lot

GitHub wouldn't take it, so I'll self host it temporarily: http://server.saagarjha.com/UTM.ipa


fix package test script

Thanks for making this it is REALLY useful!
Just simple change as npm scripts path includes node_modules/.bin.

this only works if you have jasmine-node installed globally - the script, the way I have it written, will work if you've done an npm install


random but specific crash

I have no idea even how to begin tracking this down, but we have a cucumber feature that crash randomly on a "I press" step.
It crashes most of the time, but every now and then it passes fine.
Here is the stack trace:
And I press "Oppfølging returer"                                                                   # features/step_definitions/web_steps.rb:28
  java.lang.NullPointerException: null (NativeException)
  (druby://<IP_ADDRESS>:56032) org/jruby/RubyKernel.java:2059:in `send'
  (druby://<IP_ADDRESS>:56032) org/jruby/RubyKernel.java:1419:in `loop'
  (druby://<IP_ADDRESS>:56032) org/jruby/RubyProc.java:268:in `call'
  (druby://<IP_ADDRESS>:56032) org/jruby/RubyProc.java:232:in `call'
  ./features/step_definitions/web_steps.rb:30:in `block (2 levels) in <top (required)>'
  ./features/step_definitions/web_steps.rb:15:in `with_scope'
  ./features/step_definitions/web_steps.rb:29:in `/^(?:|I )press "([^"]*)"(?: within "([^"]*)")?$/'
  features/logisticsweb/mainpage/mainpage.feature:100:in `And I press "Oppfølging returer"'

@korny Actually that gem was never mine :) I don't now who made that one.
New development is being made here:
https://github.com/Nerian/akephalos2
Checkout the install section.


screenmanager: screen's layout is fixed before on_enter is dispatched.

When on_enter is called, I hope size of the screen has been already fixed.
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager
from kivy.uix.screenmanager import Screen
from kivy.clock import Clock

class TestScreen(Screen):
    def __init__(self, **kw):
        super(TestScreen, self).__init__(**kw)

    def on_enter(self, *args):
        print 'on_enter screen size >', self.size
        Clock.schedule_interval(self.update, 1.0 / 60.0)

    def update(self, dt):
        print 'update on loop screen size >', self.size

class TestApp(App):
    def build(self):
        root = ScreenManager()
        return root

    def on_start(self):
        self.root.add_widget(TestScreen(name='scene'))

if __name__ == '__main__':
    TestApp().run()

[INFO   ] [Logger      ] Record log in /Users/sasau/.kivy/logs/kivy_15-02-25_7.txt
[INFO   ] [Kivy        ] v1.9.0-dev
[INFO   ] [Python      ] v2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
[INFO   ] [Factory     ] 173 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_imageio, img_dds, img_gif, img_pygame (img_pil, img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: pygame
[INFO   ] [GL          ] OpenGL version <2.1 INTEL-10.2.46>
[INFO   ] [GL          ] OpenGL vendor <Intel Inc.>
[INFO   ] [GL          ] OpenGL renderer <Intel Iris Pro OpenGL Engine>
[INFO   ] [GL          ] OpenGL parsed version: 2, 1
[INFO   ] [GL          ] Shading version <1.20>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <16>
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
on_enter screen size > [1, 1]
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Base        ] Start application main loop
update on loop screen size > [800, 600]
update on loop screen size > [800, 600]
update on loop screen size > [800, 600]

Good catch, but I think it would be better to force layout rather than assuming the Screen should be the same size as the ScreenManager.
Instead of:
else:
    screen.pos = self.pos
    screen.size = self.size
    self.real_add_widget(screen)

Try this:
else:
    self.real_add_widget(screen)
    self.do_layout()

That way both pos and size will be set as expected, and I will gladly merge this PR. :)

@kived
Thank you for reviewing.
I revised this commit.

:+1:


the latest nvidia pytorch image would fail during the compilation

image: nvidia/pytorch:21.04-py3
error:
-- Found cuDNN: v8.2.0  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
CMake Warning at /opt/conda/lib/python3.8/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:198 (message):
  Failed to compute shorthash for libnvrtc.so
Call Stack (most recent call first):
  /opt/conda/lib/python3.8/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
  /opt/conda/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:211 (find_package)

Can you try nvidia/pytorch:20.12-py3. We have verified the correctness on this docker image.

Can you try nvidia/pytorch:20.12-py3. We have verified the correctness on this docker image.

Yes. This image works for me and I can also run the 124M example model successfully with pytorch: gpt_sample.py. However I found that the gpt2 pt op doesn't work for gpt2 model with a different hparams setting, smaller vocabulary size and smaller layer_num.
The error is also not sufficient to debug.
RuntimeError: [FT][ERROR] CUDA runtime error: CUBLAS_STATUS_INTERNAL_ERROR /workspace/FasterTransformer/fastertransformer/utils/functions.h:674

can I ask whether we hard code some parameters based on open source gpt2 hparams.json?

Only for convenience becuase all gpt model use same vocab.


Abandoned?

Has this project been abandoned?

More like paused rather than abandoned. I like to keep working on it, but I'm in no condition to do so for at least another 6 months.
Also, the project started as a website, and not merely an open-source script. But I couldn't do marketing and stuff without funding for any longer.
Thus, I guess if I do continue, it should be with a pivot, maybe continue as a script only.

Too bad that voten.co is down. You can’t find someone to keep it up instead?


Fields & Properties standard

Hello,
I just started using this lib and noticed that the field _videoSource is public, just like its property.
public BitmapSource _videoSource = null;
Perhaps a typo in the code?

Ummm, I think it is a typo


Make available on packagist

Would be good if this package was available on packagist as well so we can easily install it with composer. I saw a lot of your other packages are already on there.
I've installed it directly from this repository for now:
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/OFFLINE-GmbH/oc-seeder-plugin"
        }
    ],
    "require-dev": {
        "offline/oc-seeder-plugin": "~1.0.5"
    },

It is now available here:
https://packagist.org/packages/offline/oc-seeder-plugin
Thank you for this suggestion!


can't run the example given

What happened:
I run the option 1 example and get below error
vents:
Type     Reason       Age                From                               Message

Normal   Scheduled    31s                default-scheduler                  Successfully assigned default/nginx-flex-blobfuse to aks-nodepool1-31835897-0
Warning  FailedMount  14s (x6 over 31s)  kubelet, aks-nodepool1-31835897-0  MountVolume.SetUp failed for volume "test" : invalid character 'F' looking for beginning of value
Anything else we need to know?:
Environment:

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:44:30Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

could you attach the /var/log/blobfuse-driver.log file on the agent node? Thanks.

@andyzhangx , elaborate more please, is agent node is the pod running blobfuse-flexvol ?

kubectl logs -f blobfuse-flexvol-installer-gvtrt --namespace kube-system
install done, daemonset sleeping

when i run the pod/nginx-flex-blobfuse example, the status remain as ContainerCreating and log showing MountVolume.SetUp failed for volume "test" : invalid character 'F' looking for beginning of value

@cometta You need to ssh to that agent node, and get the log file /var/log/blobfuse-driver.log

@andyzhangx
`
Sat Aug  3 03:04:06 UTC 2019 EXEC: mkdir -p /var/lib/kubelet/pods/the_pod_hash_masked_privacy/volumes/azure~blobfuse/test
Sat Aug  3 03:04:06 UTC 2019 INF: AZURE_STORAGE_ACCESS_KEY is set
Sat Aug  3 03:04:06 UTC 2019 INF: export storage account - export AZURE_STORAGE_ACCOUNT=<masked_privacy>
Sat Aug  3 03:04:06 UTC 2019 EXEC: blobfuse /var/lib/kubelet/pods/the_pod_hash_masked_privacy/volumes/azure~blobfuse/test --container-name=CONTAINER-NAME --tmp-path=/tmp/blobfuse -o allow_other  --file-cache-timeout-in-seconds=120
Sat Aug 3 03:04:06 UTC 2019 ERROR: { "status": "Failure", "message": "Failed to mount device /dev/ at /var/lib/kubelet/pods/the_pod_hash_masked_privacy/volumes/azure~blobfuse/test, accountname:<masked_privacy>, error log:Sat Aug 3 03:04:06 UTC 2019 EXEC: blobfuse /var/lib/kubelet/pods/the_pod_hash_masked_privacy/volumes/azure~blobfuse/test --container-name=CONTAINER-NAME --tmp-path=/tmp/blobfuse -o allow_other --file-cache-timeout-in-seconds=120" }
`

@cometta Your error could be due to non-existing storage account or storage container, to narrow down this issue, could you run following command on that agent node to check whether blobfuse works:
export AZURE_STORAGE_ACCOUNT=
export AZURE_STORAGE_ACCESS_KEY=
blobfuse /var/lib/kubelet/pods/the_pod_hash_masked_privacy/volumes/azure~blobfuse/test --container-name=CONTAINER-NAME --tmp-path=/tmp/blobfuse -o allow_other --file-cache-timeout-in-seconds=120

my bad. Thank you for guiding on how to troubleshoot it. @andyzhangx . The reason was due to incorrect container name


Use latest version on jsDelivr

jsDelivr supports latest tag, it's not updated as instantly as unpkg but should do the trick.

The new backend is live. It pulls files directly from npm and github https://github.com/jsdelivr/jsdelivr#usage
Example<EMAIL_ADDRESS>Example directory listing<EMAIL_ADDRESS>


Update LICENSE

u should replace 2020 with 2021 afaik, not just from - to

this is the most useless pr i have seen in a while, you could try making some worthwhile prs rather than making dumb prs

what the


Refactor analysis => abstract

They we can have e.g. abstract::Stack, etc.

Sadly, abstract is not a good name


Custom masked loss

This PR is created from the masked-loss branch. This PR introduces enhancements to the masked loss functionality,
inspired by the "Remove Near %" and "Remove Background %" features from the sd-webui-controlnet project.
By applying thresholds to input depth maps, pixels below a certain threshold are binarized to 0 or 1,
allowing the same depth map to have more variation and potentially improving the model's ability to focus on relevant features.
The remove_near functionality aims to turn values close to 1 into 1, while the remove_background functionality aims to turn values close to 0 into 0. It is anticipated that remove_near might allow the model to learn more about the background, whereas remove_background might facilitate learning more about the edges.
--mask_remove_near  Fixed threshold for near area removal.
--mask_remove_background Fixed threshold for background removal.
--mask_random_remove_near  Maximum random value for near area removal.
--mask_random_remove_background  Maximum random value for background removal.
Visual Illustration

Observations from Validation Loss: (purple is random 0.5 0.5)

This type of thing probably makes more sense as a separate preprocessing script to generate the mask files instead of something built into the training code.
There are a thousand different ways to create masks for a given image, depending on what we want to do, and we cannot possible handle all those use cases in the training scripts. Better to keep things simple and generic.


Fix usage array function for CuPy modules

This PR solves https://github.com/cupy/cupy/issues/2011

Jenkins, test this please

Jenkins CI test (for commit fbba65663fde656936095d1c8acaca0ac3d18470, target branch master) failed with status FAILURE.
(For contributors, please wait until the reviewer confirms the details of the error.)

  This
19:28:31             includes lists, lists of tuples, tuples, tuples of tuples, tuples
19:28:31             of lists and ndarrays.
19:28:31         dtype : data-type, optional
19:28:31             By default, the data-type is inferred from the input data.
19:28:31         order : {'C', 'F'}, optional
19:28:31             Whether to use row-major (C-style) or
19:28:31             column-major (Fortran-style) memory representation.
19:28:31             Defaults to 'C'.
19:28:31
19:28:31         Returns
19:28:31         -------
19:28:31         out : ndarray
19:28:31             Array interpretation of `a`.  No copy is performed if the input
19:28:31             is already an ndarray with matching dtype and order.    This
19:28:31             includes lists, lists of tuples, tuples, tuples of tuples, tuples
19:28:31             of lists and ndarrays.
19:28:31         dtype : data-type, optional
19:28:31             By default, the data-type is inferred from the input data.
19:28:31         order : {'C', 'F'}, optional
19:28:31             Whether to use row-major (C-style) or
19:28:31             column-major (Fortran-style) memory representation.
19:28:31             Defaults to 'C'.
19:28:31
19:28:31         Returns
19:28:31         -------
19:28:31         out : ndarray
19:28:31             Array interpretation of `a`.  No copy is performed if the input
19:28:31             is already an ndarray with matching dtype and order.  If `a` is a
19:28:31             subclass of ndarray, a base class ndarray is returned.
19:28:31
19:28:31         See Also
19:28:31         --------
19:28:31         asanyarray : Similar function which passes through subclasses.
19:28:31         ascontiguousarray : Convert input to a contiguous array.
19:28:31         asfarray : Convert input to a floating point ndarray.
19:28:31         asfortranarray : Convert input to an ndarray with column-major
19:28:31                          memory order.
19:28:31         asarray_chkfinite : Similar function which checks input for NaNs and Infs.
19:28:31         fromiter : Create an array from an iterator.
19:28:31         fromfunction : Construct an array by executing a function on grid
19:28:31                        positions.
19:28:31
19:28:31         Examples
19:28:31         --------
19:28:31         Convert a list into an array:
19:28:31
19:28:31         >>> a = [1, 2]
19:28:31         >>> np.asarray(a)
19:28:31         array([1, 2])
19:28:31
19:28:31         Existing arrays are not copied:
19:28:31
19:28:31         >>> a = np.array([1, 2])
19:28:31         >>> np.asarray(a) is a
19:28:31         True
19:28:31
19:28:31         If `dtype` is set, array is copied only if dtype does not match:
19:28:31
19:28:31         >>> a = np.array([1, 2], dtype=np.float32)
19:28:31         >>> np.asarray(a, dtype=np.float32) is a
19:28:31         True
19:28:31         >>> np.asarray(a, dtype=np.float64) is a
19:28:31         False
19:28:31
19:28:31         Contrary to `asanyarray`, ndarray subclasses are not passed through:
19:28:31
19:28:31         >>> issubclass(np.recarray, np.ndarray)
19:28:31         True
19:28:31         >>> a = np.array([(1.0, 2), (3.0, 4)], dtype='f4,i4').view(np.recarray)
19:28:31         >>> np.asarray(a) is a
19:28:31         False
19:28:31         >>> np.asanyarray(a) is a
19:28:31         True
19:28:31
19:28:31         """
19:28:31 >       return array(a, dtype, copy=False, order=order)
19:28:31 E       ValueError: object __array__ method not producing an array
19:28:31
19:28:31 a          = array([[-0.31192251,  0.54540922, -1.95350922, ..., -2.15705981,
19:28:31         -1.00669283, -0.53702112],
19:28:31        [-0.9179094...205, -0.19056921],
19:28:31        [ 0.08367027,  0.86406915,  1.26840093, ...,  0.36209913,
19:28:31          0.37135528,  0.2503814 ]])
19:28:31 dtype      = None
19:28:31 order      = None
19:28:31
19:28:31 /opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/numpy/core/numeric.py:538: ValueError
19:28:31 _______________________ TestDLTensorMemory.test_deleter ________________________
19:28:31
19:28:31 self = <cupy_tests.core_tests.test_dlpack.TestDLTensorMemory testMethod=test_deleter>
19:28:31
19:28:31     def test_deleter(self):
19:28:31         pool = cupy.get_default_memory_pool()
19:28:31         pool.free_all_blocks()
19:28:31         array = cupy.empty(10)
19:28:31         tensor = array.toDlpack()
19:28:31 >       assert pool.n_free_blocks() == 0
19:28:31 E       AssertionError: assert 2 == 0
19:28:31 E        +  where 2 = <built-in method n_free_blocks of cupy.cuda.memory.MemoryPool object at 0x7f42bac2bd30>()
19:28:31 E        +    where <built-in method n_free_blocks of cupy.cuda.memory.MemoryPool object at 0x7f42bac2bd30> = <cupy.cuda.memory.MemoryPool object at 0x7f42bac2bd30>.n_free_blocks
19:28:31
19:28:31 array      = array([1.14937202e-001, 5.26889490e-002, 8.07467735e-001, 6.38091053e-001,
19:28:31        7.82251249e-001, 1.83094166e-001, 0.00000000e+000, 0.00000000e+000,
19:28:31        9.24424698e+081, 1.83456408e+206])
19:28:31 pool       = <cupy.cuda.memory.MemoryPool object at 0x7f42bac2bd30>
19:28:31 self       = <cupy_tests.core_tests.test_dlpack.TestDLTensorMemory testMethod=test_deleter>
19:28:31 tensor     = <capsule object "dltensor" at 0x7f4257329d20>
19:28:31
19:28:31 tests/cupy_tests/core_tests/test_dlpack.py:40: AssertionError

Thanks for posting this, @niboshi. I forgot to mention before, but this PR is also related to https://github.com/cupy/cupy/pull/1650, and Jenkins will need to test with NumPy >= 1.16 and export NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1 before executing, this should fix the first error. Alternatively, I would suggest to add a pytest.importorksip() to run the test only if NumPy >= 1.17, it's still unreleased but __array_function__ is enabled by default.
The second error, from TestDLTensorMemory, seems unrelated to me and I can't reproduce it here. Is it possible that this is hardware related or a non-deterministic bug?

I fixed the conflict and took the liberty to skip the test if NumPy < 1.17. Please, let me know if that's acceptable.

Checking in.  Is there other work that remains to be done here?

I'm sorry, we have been considering how we should test this feature.
Current conclusion is not to test it for now.
Could you just remove the test?
We will restore the test once NumPy 1.17 will be released.
(For record) Possibilities included:

Add a new CI matrix with NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1.
Changing NumPy's internal flag from within the test.
Use a child process to run the test (with NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1).

1. is costly in terms of effort.
2. just doesn't work; NumPy uses the flag on import.
3. Child process would have to start in spawn mode, but that mode has to be configured globally; not appropriate as something to be done in a test.

Ah, sorry, current test has @testing.with_requires('numpy>=1.17.0') so I think it's OK.

Jenkins, test this please

Jenkins CI test (for commit c535e6a0116a9c98b91aaf097efa87dba5162f2c, target branch master) failed with status FAILURE.
(For contributors, please wait until the reviewer confirms the details of the error.)

Jenkins failure is irrelevant to this PR.
TestDLTensorMemory failure is gone for some reason. I assume it was also irrelevant.
LGTM, thank you so much!

Thank you for the review @niboshi !
I'm looking forward to seeing better CuPy and Dask integration in the future.
Thanks @pentschev for finding and fixing this.

Thanks @niboshi for taking the time to review. Thanks also @mrocklin for the help with reaching the solution.


adding support for clustering by hostname in kubernetes

These changes should allow clustering in k8s by hostname and not just IP. The use case is having a rabbitmq cluster as a StatefulSet with persistent volumes.
Please let me know if the code looks OK. I had to learn erlang in order to make these changes :-)

Hi @pavel987 ,
Thank you very much for solving my issue with the k8s discovery operating in "ip" mode, which was unsuitable for use with petset/statefulset because:

the RABBITMQ_NODENAME had to be forced to the pod's ipaddress (using init container)
the pod's internal ipaddress changes every time the pod is redeployed
thus if using persistent storage RabbitMQ will fail to reload its mnesia directory upon redeployment

Your feature finally allowed me to configure the rabbitmq nodes to use the petset's hostname as RABBITMQ_NODENAME, thus be able to reload the mnesia data after redeployment. After experimenting for a few hours with the patch I had good success and am looking forward to seeing it merged (together with the fix in https://github.com/aweber/rabbitmq-autocluster/issues/92#issuecomment-270215627).
I have shared a gist of my current setup. To use it, you will need to compile the rabbitmq_autocluster plugin to include this patch, and save the resulting binary as docker/autocluster-0.6.1.ez; then run docker build -t dev-rabbitmq-kubernetes . to build a test image.
In my girst, the README.md file explains how to setup openshift to run a 3-node RabbitMQ petset, using stable RABBITMQ_NODENAMES. You will need to install the latest openshift client (currently v1.4.1) from here.
To make the example more useful, the petset template should be modified to use persistent storage instead of emptyDir storage, else when a pod is deleted then recreated by openshift, the following message will be found in the log:
   =ERROR REPORT==== 20-Feb-2017::11:05:12 ===
autocluster: Failed to join to cluster: {inconsistent_cluster,
                                         "Node<EMAIL_ADDRESS>thinks it's clustered with node<EMAIL_ADDRESS>but<EMAIL_ADDRESS>disagrees"}

Also, if making your own template, be very careful with the PetSet serviceName attribute, only the endpoints for the Service with that name will have the hostname field that is needed to use this plugin with K8S_ADDRESS_TYPE environment variable set to "hostname".

@pavel987 can you reopen the PR against https://github.com/rabbitmq/rabbitmq- autocluster ? All development seems to have moved there

This plugin was forked by the RabbitMQ team and is now part of RabbitMQ. More information can be found @ https://github.com/rabbitmq/rabbitmq-autocluster


Add /* clang-format off */

Please add a /* clang-format off */ comment to the lv_drv_conf_template.h file just like in the lv_conf_template.h

Please a send a Pull request.


add zlib support.

I like the hassle-free UDP transport for sending packets,
and I like zlib for sending a lot of data in smaller packets.

I'm torn on this patch. In one case, it sounds like a neat feature add. OTOH, I can't find a single instance where a user has requested compression. I'm tempted to rebase and resubmit this, but I'm a little concerned that you deemed the change worthy enough to add yourself to the Copyrights.
/cc @drawks @SEJeff @jssjr @mleinart for opinions

This looks like a useful way to reduce packet-per-second on the receiver at the expense of higher CPU load due to decompression overhead. I can see situations where this might be worthwhile.
The copyright modification isn't needed and should be removed. Though, it would be nice to have an AUTHORS file.

should the milestone be updated to 1.2.0?

This is an old one. Needs to be rebased and made compatible with py3.


Documentation stub

Good morning Saad, I am sorry for the bother: I am trying to repeat the cloning/readthedocs process you guided me through, but this time on my laptop, and I think I am missing a step... Can you please send me the steps you followed? (or, only if you have 15 min later today, maybe you can guide me through this again but this time I will document the steps to make sure I include them in the how-to-guide we will provide future team members). Thanks very much!


Problem with declarative macros

Hello there. I have problem with declarative macros. The code is simplified as below:
use async_trait::async_trait;

#[async_trait]
trait T1 {
    async fn id(&self) -> i32;
}

macro_rules! impl_t1 {
    ($ty: ty, $id: expr) => {
        #[async_trait]
        impl T1 for $ty {
            async fn id(&self) -> i32 {
                $id
            }
        }
    };
}

struct Foo;

impl_t1!(Foo, 1);

fn main() {}

rust compiler generates an error:
error[E0424]: expected value, found module `self`
  --> src/main.rs:10:9
   |
1  | / use async_trait::async_trait;
2  | |
3  | | #[async_trait]
4  | | trait T1 {
...  |
9  | |     ($ty: ty, $id: expr) => {
10 | |         #[async_trait]
   | |         ^^^^^^^^^^^^^-
   | |_________|____________|
   |           |            this function doesn't have a `self` parameter
   |           `self` value is a keyword only available in methods with a `self` parameter
...
21 |   impl_t1!(Foo, 1);
   |   ----------------- in this macro invocation
   |
   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0424`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

This is a compiler bug (https://github.com/rust-lang/rust/issues/43081). You can work around it by writing the decl macro as:
macro_rules! impl_t1 {
    ($ty:tt, $($id:tt)*) => {
        #[async_trait]
        impl T1 for $ty {
            async fn id(&self) -> i32 {
                $($id)*
            }
        }
    };
}

This will be fixed in #105.

This is a compiler bug (rust-lang/rust#43081). You can work around it by writing the decl macro as:
macro_rules! impl_t1 {
    ($ty:tt, $($id:tt)*) => {
        #[async_trait]
        impl T1 for $ty {
            async fn id(&self) -> i32 {
                $($id)*
            }
        }
    };
}

It works. Thank you!


Make rand and rayon optional

Both are only used in test utilities and examples, and both can interfere with WASM compilation.
Now both are behind a test_utils feature.

Thanks for this as well Chris, I'll look to get these merged in and released today.

Closing as these changes were merged in https://github.com/sdd/kiddo/pull/143