Coder Social home page Coder Social logo

Comments (6)

hhyo avatar hhyo commented on May 15, 2024

@liipx
另外一个Sampling data的错误

  • 准备表结构和数据
create table soar_test(
  id bigint unsigned primary key auto_increment,
  v varchar(10) not null default ''
);
insert into soar_test (v)
values ('');
  • 输入语句
    select * from soar_test;

  • 错误日志

2018/10/29 16:30:20.994 [D] [mysql.go:76] Execute SQL with DSN(127.0.0.1:3306/optimizer_osGC5MGrm3tl97k4) : CREATE TABLE `soar_test` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `v` varchar(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
2018/10/29 16:30:21.020 [D] [env.go:397] createTable, Start Sampling data from archery.soar_test to optimizer_osGC5MGrm3tl97k4.soar_test ...
2018/10/29 16:30:21.025 [D] [mysql.go:76] Execute SQL with DSN(mysql:3306/archery) : show table status where name = 'soar_test'
2018/10/29 16:30:21.032 [D] [mysql.go:76] Execute SQL with DSN(mysql:3306/archery) : show table status where name = 'soar_test'
2018/10/29 16:30:21.039 [D] [sampling.go:99] SamplingData, tableRows: 1, wantRowsCount: 30000, factor: 30000.000000
2018/10/29 16:30:21.039 [D] [sampling.go:118] Sampling data execute: select DATA_TYPE from information_schema.COLUMNS where TABLE_SCHEMA='optimizer_osGC5MGrm3tl97k4' and TABLE_NAME = 'soar_test'
2018/10/29 16:30:21.046 [E] [sampling.go:227] doSampling Error from optimizer_osGC5MGrm3tl97k4.soar_test: Received #1048 error from MySQL server: "Column 'v' cannot be null"
2018/10/29 16:30:21.046 [D] [sampling.go:215] 1 rows sampling out

from soar.

LPX-E5BD8 avatar LPX-E5BD8 commented on May 15, 2024

贴case的时候时候小心泄露隐私数据。

from soar.

hhyo avatar hhyo commented on May 15, 2024

贴case的时候时候小心泄露隐私数据。

谢谢提醒,是特意准备的测试数据,库名也是开源的项目测试库。不过问一句wantRowsCount: 30000是可配置还是固定的。

from soar.

martianzhang avatar martianzhang commented on May 15, 2024
wantRowsCount := 300 * common.Config.SamplingStatisticTarget
soar -h | grep -i sampling
  -sampling-statistic-target int
        SamplingStatisticTarget, 数据采样因子,对应postgres的default_statistics_target (default 100)

from soar.

lenovore avatar lenovore commented on May 15, 2024

Received #1048 error from MySQL server: "Column 'v' cannot be null"

Sampling data会把空字符串转换成null?

from soar.

hhyo avatar hhyo commented on May 15, 2024

两个case测试都正常,谢谢~

from soar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.