Skip to content

Commit 3e044a8

Browse files
committed
test: Map accepts any type as value
1 parent 0954d11 commit 3e044a8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ describe('queries', () => {
474474
arr2 Array(Date),
475475
arr3 Array(UInt8),
476476
rec Map(String, String),
477-
rec2 Map(String, Date),
477+
rec2 Map(String, Map(Date, Array(UInt8))),
478478
rec3 Map(String, Nullable(UInt8))
479479
) ENGINE=MergeTree(date, date, 8192)
480480
`).toPromise();
@@ -488,7 +488,7 @@ describe('queries', () => {
488488
arr2: ['1915-01-02', '1915-01-03'],
489489
arr3: [1, 2, 3, 4, 5],
490490
rec: {},
491-
rec2: { a: '1915-01-02', b: '1915-01-03' },
491+
rec2: { a: { '1915-01-02': [1, 2, 3] }, b: { '1915-01-03': [4, 5] } },
492492
rec3: { a: 1, b: 2, c: 3, d: 4, e: null },
493493
},
494494

@@ -499,7 +499,7 @@ describe('queries', () => {
499499
arr2: ['1915-02-02'],
500500
arr3: [],
501501
rec: { a: '5670000000', b: 'asdas dasf' },
502-
rec2: { a: '1915-02-02' },
502+
rec2: { a: { '1915-02-02': [] } },
503503
rec3: {},
504504
}
505505
];
@@ -523,15 +523,15 @@ describe('queries', () => {
523523
arr3 Array(UInt8),
524524
fixedStr String,
525525
rec Map(String, String),
526-
rec2 Map(String, DateTime),
526+
rec2 Map(String, Map(DateTime, Array(UInt8))),
527527
rec3 Map(String, UInt8)
528528
) ENGINE=MergeTree(date, date, 8192)
529529
`).toPromise();
530530
expect(r).to.be.ok();
531531

532532
const rows = [
533-
'(\'2018-01-01 10:00:00\',\'Вам, проживающим за оргией оргию,\',[],[\'1915-01-02 10:00:00\',\'1915-01-03 10:00:00\'],[1,2,3,4,5],unhex(\'60ed56e75bb93bd353267faa\'),{},{\'a\':\'1915-01-02 10:00:00\',\'b\':\'1915-01-03 10:00:00\'},{\'a\':1,\'b\':2,\'c\':3,\'d\':4,\'e\':5})',
534-
'(\'2018-02-01 10:00:00\',\'имеющим ванную и теплый клозет!\',[\'5670000000\',\'asdas dasf\'],[\'1915-02-02 10:00:00\'],[],unhex(\'60ed56f4a88cd5dcb249d959\'),{\'a\':\'5670000000\',\'b\':\'asdas dasf\'},{\'a\':\'1915-02-02 10:00:00\'},{})'
533+
'(\'2018-01-01 10:00:00\',\'Вам, проживающим за оргией оргию,\',[],[\'1915-01-02 10:00:00\',\'1915-01-03 10:00:00\'],[1,2,3,4,5],unhex(\'60ed56e75bb93bd353267faa\'),{},{\'a\':{\'1915-01-02 10:00:00\':[1,2,3]},\'b\':{\'1915-01-03 10:00:00\':[4,5]}},{\'a\':1,\'b\':2,\'c\':3,\'d\':4,\'e\':5})',
534+
'(\'2018-02-01 10:00:00\',\'имеющим ванную и теплый клозет!\',[\'5670000000\',\'asdas dasf\'],[\'1915-02-02 10:00:00\'],[],unhex(\'60ed56f4a88cd5dcb249d959\'),{\'a\':\'5670000000\',\'b\':\'asdas dasf\'},{\'a\':{\'1915-02-02 10:00:00\':[]}},{})'
535535
];
536536

537537
const r2 = await clickhouse.insert(

0 commit comments

Comments
 (0)