Skip to content

Commit 182742f

Browse files
committed
Remove export column from equality
1 parent c005bb4 commit 182742f

2 files changed

Lines changed: 7 additions & 34 deletions

File tree

sdks/julia/LogicalQueryProtocol.jl/src/equality.jl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -365,20 +365,11 @@ Base.isequal(a::IcebergCatalogConfig, b::IcebergCatalogConfig) =
365365
isequal(a.scope, b.scope) &&
366366
isequal(a.properties, b.properties)
367367

368-
# ExportColumn
369-
Base.:(==)(a::ExportColumn, b::ExportColumn) =
370-
a.name == b.name && a.nullable == b.nullable
371-
Base.hash(a::ExportColumn, h::UInt) =
372-
hash(a.nullable, hash(a.name, h))
373-
Base.isequal(a::ExportColumn, b::ExportColumn) =
374-
isequal(a.name, b.name) && isequal(a.nullable, b.nullable)
375-
376368
# ExportIcebergConfig
377369
Base.:(==)(a::ExportIcebergConfig, b::ExportIcebergConfig) =
378370
a.locator == b.locator &&
379371
a.config == b.config &&
380372
a.table_def == b.table_def &&
381-
a.columns == b.columns &&
382373
a.prefix == b.prefix &&
383374
a.target_file_size_bytes == b.target_file_size_bytes &&
384375
a.compression == b.compression &&
@@ -389,15 +380,14 @@ Base.hash(a::ExportIcebergConfig, h::UInt) = hash(
389380
a.compression,
390381
hash(
391382
a.target_file_size_bytes,
392-
hash(a.prefix, hash(a.columns, hash(a.table_def, hash(a.config, hash(a.locator, h))))),
383+
hash(a.prefix, hash(a.table_def, hash(a.config, hash(a.locator, h)))),
393384
),
394385
),
395386
)
396387
Base.isequal(a::ExportIcebergConfig, b::ExportIcebergConfig) =
397388
isequal(a.locator, b.locator) &&
398389
isequal(a.config, b.config) &&
399390
isequal(a.table_def, b.table_def) &&
400-
isequal(a.columns, b.columns) &&
401391
isequal(a.prefix, b.prefix) &&
402392
isequal(a.target_file_size_bytes, b.target_file_size_bytes) &&
403393
isequal(a.compression, b.compression) &&

sdks/julia/LogicalQueryProtocol.jl/test/equality_tests.jl

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,35 +2262,18 @@ end
22622262
@test a == a
22632263
end
22642264

2265-
@testitem "Equality for ExportColumn" tags=[:ring1, :unit] begin
2266-
using LogicalQueryProtocol: ExportColumn
2267-
2268-
a = ExportColumn(name="col1", nullable=false)
2269-
b = ExportColumn(name="col1", nullable=false)
2270-
c = ExportColumn(name="col2", nullable=false)
2271-
d = ExportColumn(name="col1", nullable=true)
2272-
2273-
@test a == b
2274-
@test a != c
2275-
@test a != d
2276-
@test isequal(a, b)
2277-
@test hash(a) == hash(b)
2278-
@test a == a
2279-
end
2280-
22812265
@testitem "Equality for ExportIcebergConfig" tags=[:ring1, :unit] begin
2282-
using LogicalQueryProtocol: ExportIcebergConfig, ExportColumn, IcebergLocator, IcebergCatalogConfig, RelationId
2266+
using LogicalQueryProtocol: ExportIcebergConfig, IcebergLocator, IcebergCatalogConfig, RelationId
22832267

22842268
loc = IcebergLocator(table_name="t", namespace=["n"], warehouse="w")
22852269
cfg = IcebergCatalogConfig(catalog_uri="uri", scope="", properties=Dict(), auth_properties=Dict())
22862270
rid = RelationId(id_low=1, id_high=0)
2287-
cols = [ExportColumn(name="c1", nullable=false)]
22882271

2289-
a = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, columns=cols, prefix="", target_file_size_bytes=0, compression="", table_properties=Dict())
2290-
b = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, columns=cols, prefix="", target_file_size_bytes=0, compression="", table_properties=Dict())
2291-
c = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, columns=cols, prefix="pfx", target_file_size_bytes=0, compression="", table_properties=Dict())
2292-
d = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, columns=cols, prefix="", target_file_size_bytes=0, compression="SNAPPY", table_properties=Dict())
2293-
e = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, columns=cols, prefix="", target_file_size_bytes=0, compression="", table_properties=Dict("k" => "v"))
2272+
a = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, prefix="", target_file_size_bytes=0, compression="", table_properties=Dict())
2273+
b = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, prefix="", target_file_size_bytes=0, compression="", table_properties=Dict())
2274+
c = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, prefix="pfx", target_file_size_bytes=0, compression="", table_properties=Dict())
2275+
d = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, prefix="", target_file_size_bytes=0, compression="SNAPPY", table_properties=Dict())
2276+
e = ExportIcebergConfig(locator=loc, config=cfg, table_def=rid, prefix="", target_file_size_bytes=0, compression="", table_properties=Dict("k" => "v"))
22942277

22952278
@test a == b
22962279
@test a != c

0 commit comments

Comments
 (0)